dect
/
linux-2.6
Archived
13
0
Fork 0

scripts/kallsyms: suppress build warning

Suppress a warn_unused_result warning.

fgets is called as a part of error handling.  It is called just to drop a
line and return immediately.  read_map is reading the file in a loop and
read_symbol reads line by line.  So I think there is no point in using
return value for useful checking.  Other checks like 3 items were returned
or !EOF have already been done.

Signed-off-by: Himanshu Chauhan <hschauhan@nulltrace.org>
Cc: WANG Cong <xiyou.wangcong@gmail.com>
Cc: Michal Marek <mmarek@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Michal Marek <mmarek@suse.cz>
This commit is contained in:
Himanshu Chauhan 2010-01-27 16:53:20 -08:00 committed by Michal Marek
parent d4987bd7ae
commit 71d41aed94
1 changed files with 4 additions and 2 deletions

View File

@ -108,8 +108,10 @@ 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);
/* skip line. sym is used as dummy to
* shut of "warn_unused_result" warning.
*/
sym = fgets(str, 500, in);
}
return -1;
}