qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH 10/17] usb-linux.c: fix warning with _FORTIFY_SOURCE


From: Juan Quintela
Subject: [Qemu-devel] [PATCH 10/17] usb-linux.c: fix warning with _FORTIFY_SOURCE
Date: Wed, 20 Jan 2010 21:14:06 +0100

From: Kirill A. Shutemov <address@hidden>

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 <address@hidden>
Signed-off-by: Juan Quintela <address@hidden>
---
 usb-linux.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/usb-linux.c b/usb-linux.c
index 5619b30..1aaa595 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)
-- 
1.6.6





reply via email to

[Prev in Thread] Current Thread [Next in Thread]