diff options
author | Himanshu Chauhan <hschauhan@nulltrace.org> | 2010-01-27 19:53:20 -0500 |
---|---|---|
committer | Michal Marek <mmarek@suse.cz> | 2010-02-02 08:33:56 -0500 |
commit | 71d41aed9468a1239cff1b2d928954885b09de6c (patch) | |
tree | 58fbf55e18b20a75f26ecad29b5a71d71cbbf00a | |
parent | d4987bd7ae8401bd88896a6f76dc7af31fe55732 (diff) |
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>
-rw-r--r-- | scripts/kallsyms.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/scripts/kallsyms.c b/scripts/kallsyms.c index 86c3896a1e01..e3902fb39afd 100644 --- a/scripts/kallsyms.c +++ b/scripts/kallsyms.c | |||
@@ -108,8 +108,10 @@ static int read_symbol(FILE *in, struct sym_entry *s) | |||
108 | rc = fscanf(in, "%llx %c %499s\n", &s->addr, &stype, str); | 108 | rc = fscanf(in, "%llx %c %499s\n", &s->addr, &stype, str); |
109 | if (rc != 3) { | 109 | if (rc != 3) { |
110 | if (rc != EOF) { | 110 | if (rc != EOF) { |
111 | /* skip line */ | 111 | /* skip line. sym is used as dummy to |
112 | fgets(str, 500, in); | 112 | * shut of "warn_unused_result" warning. |
113 | */ | ||
114 | sym = fgets(str, 500, in); | ||
113 | } | 115 | } |
114 | return -1; | 116 | return -1; |
115 | } | 117 | } |