From: Himanshu Chauhan Date: Thu, 28 Jan 2010 00:53:20 +0000 (-0800) Subject: scripts/kallsyms: suppress build warning X-Git-Tag: v2.6.35-rc2~61^2~62 X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=71d41aed9468a1239cff1b2d928954885b09de6c;p=~emulex%2Finfiniband.git 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 Cc: WANG Cong Cc: Michal Marek Signed-off-by: Andrew Morton Signed-off-by: Michal Marek --- diff --git a/scripts/kallsyms.c b/scripts/kallsyms.c index 86c3896a1e0..e3902fb39af 100644 --- a/scripts/kallsyms.c +++ b/scripts/kallsyms.c @@ -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; }