tbeu / matio

MATLAB MAT File I/O Library
https://matio.sourceforge.io
BSD 2-Clause "Simplified" License
342 stars 96 forks source link

Remove GCC warnings on unused return value of fread #48

Closed tbeu closed 8 years ago

tbeu commented 8 years ago

See https://travis-ci.org/tbeu/matio/jobs/169049417#L911-L914 for the GCC output with warnings on unused return value of fread.

vharsh commented 8 years ago

I have added bytesread += before every fread call at the mentioned lines, does that fix the issue? Besides, I tried to reproduce the warning messages for a small program which takes a number as input and writes it back to the console. I have GCC 6.2.1 I didn't get any such messages, with -Wall -Werror -Wunused-result flag, please tell me more about this, did I miss a flag or two? as a person who has been knowing some C for 2+ years, should I read gcc's manual page line by line, during free times?