class.c:74: warning: ignoring return value of 'fscanf', declared with attribute warn_unused_result class.c:78: warning: ignoring return value of 'fscanf', declared with attribute warn_unused_result class.c:92: warning: ignoring return value of 'fscanf', declared with attribute warn_unused_result
Any help please?
06 May, 2009, David Haley wrote in the 2nd comment:
Votes: 0
It's telling you that you should be checking the return value of fscanf (for instance, to see if there was an error). Run 'man fscanf' to see the documentation for the function and the meaning of the return values.
It looks like you're trying to use regex within the fscanf statement. fscanf works just like printf (though in reverse). I think what you want is to read a string (the skill name, maybe?). Try
fscanf (fp, " %s\n", buf); /* read name of skill into buf */
Might fix things.
07 May, 2009, David Haley wrote in the 6th comment:
Votes: 0
Even if fscanf is being used incorrectly, the compiler is complaining about the fact that its return value is ignored, meaning that you might miss things like EOF, failure to read, etc.
Gives me these warnings
Any help please?