I am reviewing an old cpp program which reads data from a binary file. The code was written on Mac OS and for Mac OS. The author (who I am unable to contact) uses two variations of fread(). One with the second argument specified as sizeof(int) and one as sizeof(unsigned). Assuming that sizeof(int) == sizeof(unsinged) is there any difference in using these two methods?
fread(&intArr[0], sizeof (int), 1, datafile);
fread(&intArr[0], sizeof (unsigned), 1, datafile);
http://www.cplusplus.com/reference/cstdio/fread/
specifies that the second argument is the size of bytes of each element to be read so I don't think theres should be any difference in their use-age (unless of course sizeof() is different). These two variations are mixed (seemingly randomly) throughout the file and I cannot determine why the original author would use one or the other. I just want to be sure I am not missing some tiny detail which would affect their impletmentaion.