the two middle arguments to fread() are easily confused, and cause the checking of return value to fail incorrectly (and possibly succeed incorrectly.)
in case this code should ever be used as an example, a warning is a nice way of helping ensure insecure keys are not generated