summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorMarek Belisko <marek.belisko@open-nandra.com>2011-05-02 21:52:59 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2011-05-04 08:41:46 +0200
commitbb5e01017e57aeb301631aedb4bc60b26cdfc3f3 (patch)
tree7840ffdccdb8e183e2cdc8e0bc224bbca4e3fe28 /scripts
parent9efdd9ee1dc0c9dfaf97299f91b5cff520188529 (diff)
downloadbarebox-bb5e01017e57aeb301631aedb4bc60b26cdfc3f3.tar.gz
barebox-bb5e01017e57aeb301631aedb4bc60b26cdfc3f3.tar.xz
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>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/kallsyms.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/scripts/kallsyms.c b/scripts/kallsyms.c
index 1f11d8485..b3591a916 100644
--- a/scripts/kallsyms.c
+++ b/scripts/kallsyms.c
@@ -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;
}