ignoring return value of ‘fscanf’, declared with attribute warn_unused_result
Hi,
I was wondering if don't accept return value of fscanf and fgets, can these warnings be some potentially serious problem:
Quote:
warning: ignoring return value of ‘fscanf’, declared with attribute warn_unused_result
warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result
Here is the code:
Code:
fscanf(modelfl,"%ld%*[^\n]\n", &model->kernel_parm.kernel_type); // model is just some realization of a structure
fgets(line,(int)ll,modelfl);
Makefile setting:
Quote:
CFLAGS= $(SFLAGS) -O3 # release C-Compiler flags
LFLAGS= $(SFLAGS) -O3 # release linker flags
LIBS=-L. -lm
These warnings only occur when -O3 is specified. If nothing is specified, then there will be no warning.
Thanks in advance!