From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:53501) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TQRGe-0002gG-VW for qemu-devel@nongnu.org; Mon, 22 Oct 2012 19:18:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TQRGe-0001Tj-2O for qemu-devel@nongnu.org; Mon, 22 Oct 2012 19:18:44 -0400 Received: from mail-ie0-f173.google.com ([209.85.223.173]:65144) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TQRGd-0001Te-Sw for qemu-devel@nongnu.org; Mon, 22 Oct 2012 19:18:43 -0400 Received: by mail-ie0-f173.google.com with SMTP id 17so4549713iea.4 for ; Mon, 22 Oct 2012 16:18:42 -0700 (PDT) From: Catalin Patulea Date: Mon, 22 Oct 2012 19:18:35 -0400 Message-Id: <1350947915-8213-1-git-send-email-catalinp@google.com> Subject: [Qemu-devel] [PATCH] tests/tcg: fix a few warnings List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Catalin Patulea Signed-off-by: Catalin Patulea --- This leaves a few of these: warning: ignoring return value of 'write', declared with attribute warn_unused_result How interesting is it to fix these? (Perhaps by asserting that the full write completed?) tests/tcg/hello-i386.c | 3 ++- tests/tcg/test-i386.c | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/tcg/hello-i386.c b/tests/tcg/hello-i386.c index 86afc34..fa00380 100644 --- a/tests/tcg/hello-i386.c +++ b/tests/tcg/hello-i386.c @@ -1,6 +1,6 @@ #include -static inline volatile void exit(int status) +static inline void exit(int status) { int __res; __asm__ volatile ("movl %%ecx,%%ebx\n"\ @@ -17,6 +17,7 @@ static inline int write(int fd, const char * buf, int len) "popl %%ebx\n"\ : "=a" (status) \ : "0" (__NR_write),"S" ((long)(fd)),"c" ((long)(buf)),"d" ((long)(len))); + return status; } void _start(void) diff --git a/tests/tcg/test-i386.c b/tests/tcg/test-i386.c index 64d929e..40392ac 100644 --- a/tests/tcg/test-i386.c +++ b/tests/tcg/test-i386.c @@ -785,7 +785,7 @@ void fpu_clear_exceptions(void) long double fpregs[8]; } float_env32; - asm volatile ("fnstenv %0\n" : : "m" (float_env32)); + asm volatile ("fnstenv %0\n" : "=m" (float_env32)); float_env32.fpus &= ~0x7f; asm volatile ("fldenv %0\n" : : "m" (float_env32)); } -- 1.7.7.3