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:
parent
9efdd9ee1d
commit
bb5e01017e
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue