9
0
Fork 0

scripts: Fix compilation warning.

Fix following warning:
scripts/kallsyms.c: In function ‘read_symbol’:
scripts/kallsyms.c:81:9: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result

Solution overtaken from kernel tree.

Signed-off-by: Marek Belisko <marek.belisko@open-nandra.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This commit is contained in:
Marek Belisko 2011-05-02 21:52:59 +02:00 committed by Sascha Hauer
parent 9efdd9ee1d
commit bb5e01017e
1 changed files with 2 additions and 4 deletions

View File

@ -76,10 +76,8 @@ static int read_symbol(FILE *in, struct sym_entry *s)
rc = fscanf(in, "%llx %c %499s\n", &s->addr, &stype, str);
if (rc != 3) {
if (rc != EOF) {
/* skip line */
fgets(str, 500, in);
}
if (rc != EOF && fgets(str, 500, in) == NULL)
fprintf(stderr, "Read error or end of file.\n");
return -1;
}