From: Kirill A. Shutemov Date: Tue, 19 Jan 2010 23:56:17 +0000 (+0100) Subject: usb-linux.c: fix warning with _FORTIFY_SOURCE X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=9f99cee7fa88af069cb583b0feb8c7910455b218;p=qemu.git usb-linux.c: fix warning with _FORTIFY_SOURCE 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 Signed-off-by: Anthony Liguori --- diff --git a/usb-linux.c b/usb-linux.c index 5619b30600..1aaa5950f5 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)