From patchwork Tue May 25 00:50:59 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ben Dooks X-Patchwork-Id: 102074 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 o4P0pFJk018838 for ; Tue, 25 May 2010 00:51:15 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758083Ab0EYAvO (ORCPT ); Mon, 24 May 2010 20:51:14 -0400 Received: from trinity.fluff.org ([89.16.178.74]:54938 "EHLO trinity.fluff.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757983Ab0EYAvO (ORCPT ); Mon, 24 May 2010 20:51:14 -0400 Received: from ben by trinity.fluff.org with local (Exim 4.69) (envelope-from ) id 1OGiMH-0003yf-HY; 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:50:59 +0100 Message-Id: <1274748661-15253-2-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:15 +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; }