From patchwork Tue Jan 19 23:56:17 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Juan Quintela X-Patchwork-Id: 43250 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 44691B7CDB for ; Wed, 20 Jan 2010 11:19:53 +1100 (EST) Received: from localhost ([127.0.0.1]:43460 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NXOHr-0005ZL-0v for incoming@patchwork.ozlabs.org; Tue, 19 Jan 2010 19:19:07 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NXNwL-0005vC-K4 for qemu-devel@nongnu.org; Tue, 19 Jan 2010 18:56:53 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NXNwF-0005qL-22 for qemu-devel@nongnu.org; Tue, 19 Jan 2010 18:56:52 -0500 Received: from [199.232.76.173] (port=59383 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NXNwE-0005q6-Q5 for qemu-devel@nongnu.org; Tue, 19 Jan 2010 18:56:46 -0500 Received: from mx1.redhat.com ([209.132.183.28]:11035) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NXNwE-0005wU-7n for qemu-devel@nongnu.org; Tue, 19 Jan 2010 18:56:46 -0500 Received: from int-mx08.intmail.prod.int.phx2.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o0JNujOU015080 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 19 Jan 2010 18:56:45 -0500 Received: from localhost.localdomain (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx08.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o0JNuT3r027975; Tue, 19 Jan 2010 18:56:44 -0500 From: Juan Quintela To: qemu-devel@nongnu.org Date: Wed, 20 Jan 2010 00:56:17 +0100 Message-Id: <36ef64634c0f27d079bef67f7d2cbc592640edc8.1263944807.git.quintela@redhat.com> In-Reply-To: References: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.67 on 10.5.11.21 X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. Cc: kirill@shutemov.name Subject: [Qemu-devel] [PATCH 10/17] usb-linux.c: fix warning with _FORTIFY_SOURCE X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: Kirill A. Shutemov CC usb-linux.o cc1: warnings being treated as errors usb-linux.c: In function 'usb_host_read_file': usb-linux.c:1204: error: ignoring return value of 'fgets', declared with attribute warn_unused_result make: *** [usb-linux.o] Error 1 Signed-off-by: Kirill A. Shutemov Signed-off-by: Juan Quintela --- usb-linux.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/usb-linux.c b/usb-linux.c index 88728e9..be1d979 100644 --- a/usb-linux.c +++ b/usb-linux.c @@ -1201,9 +1201,8 @@ static int usb_host_read_file(char *line, size_t line_size, const char *device_f device_file); f = fopen(filename, "r"); if (f) { - fgets(line, line_size, f); + ret = fgets(line, line_size, f) != NULL; fclose(f); - ret = 1; #if 0 } else { if (mon)