OSDN Git Service

tests/tcg: fix a few warnings
authorCatalin Patulea <catalinp@google.com>
Mon, 22 Oct 2012 23:18:35 +0000 (19:18 -0400)
committerBlue Swirl <blauwirbel@gmail.com>
Sat, 27 Oct 2012 14:37:25 +0000 (14:37 +0000)
Signed-off-by: Catalin Patulea <catalinp@google.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
tests/tcg/hello-i386.c
tests/tcg/test-i386.c

index 86afc34..fa00380 100644 (file)
@@ -1,6 +1,6 @@
 #include <asm/unistd.h>
 
-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)
index 64d929e..40392ac 100644 (file)
@@ -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));
 }