From patchwork Tue May 25 00:51:00 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ben Dooks X-Patchwork-Id: 102072 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o4P0pBCf018803 for ; Tue, 25 May 2010 00:51:11 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758050Ab0EYAvK (ORCPT ); Mon, 24 May 2010 20:51:10 -0400 Received: from trinity.fluff.org ([89.16.178.74]:54929 "EHLO trinity.fluff.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755678Ab0EYAvJ (ORCPT ); Mon, 24 May 2010 20:51:09 -0400 Received: from ben by trinity.fluff.org with local (Exim 4.69) (envelope-from ) id 1OGiMH-0003yh-JJ; Tue, 25 May 2010 01:51:01 +0100 From: Ben Dooks To: linux-kernel@lists.infradead.org, linux-kbuild@vger.kernel.org Cc: Ben Dooks Subject: [PATCH] kbuild: kallsysms: throw away result of fgets() Date: Tue, 25 May 2010 01:51:00 +0100 Message-Id: <1274748661-15253-3-git-send-email-ben-linux@fluff.org> X-Mailer: git-send-email 1.5.6.5 In-Reply-To: <1274748661-15253-1-git-send-email-ben-linux@fluff.org> References: <1274748661-15253-1-git-send-email-ben-linux@fluff.org> MIME-Version: 1.0 X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: ben@trinity.fluff.org X-SA-Exim-Scanned: No (on trinity.fluff.org); SAEximRunCond expanded to false Sender: linux-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Tue, 25 May 2010 00:51:11 +0000 (UTC) diff --git a/scripts/kallsyms.c b/scripts/kallsyms.c index 86c3896..87c3d38 100644 --- a/scripts/kallsyms.c +++ b/scripts/kallsyms.c @@ -109,7 +109,11 @@ static int read_symbol(FILE *in, struct sym_entry *s) if (rc != 3) { if (rc != EOF) { /* skip line */ - fgets(str, 500, in); + char *tmp = fgets(str, 500, in); + + /* shut unused-result warning up */ + if (!tmp) + str[0] = '\0'; } return -1; }