From: Bernhard Kaindl <[EMAIL PROTECTED]>

This patch fixes user/test/x86/emulator.flat on kvm-59 with x86_64/E6850
and three other warnings:

test/x86/access.c: In function 'ac_test_exec':
test/x86/access.c:541: warning: implicit declaration of function 'strcat'

test/x86/emulator.c: In function 'test_cmps':
test/x86/emulator.c:26: warning: unused variable 'i'
test/x86/emulator.c: In function 'test_push':
test/x86/emulator.c:115: warning: 'tmp' is used uninitialized in this function

test/x86/lib/printf.c: In function 'vsnprintf':
test/x86/lib/printf.c:95: warning: unused variable 'n'

Signed-off-by: Bernhard Kaindl <[EMAIL PROTECTED]>
Signed-off-by: Avi Kivity <[EMAIL PROTECTED]>

diff --git a/user/test/x86/access.c b/user/test/x86/access.c
index adfb944..daeb272 100644
--- a/user/test/x86/access.c
+++ b/user/test/x86/access.c
@@ -1,6 +1,7 @@
 
 #include "smp.h"
 #include "printf.h"
+#include "string.h"
 
 #define true 1
 #define false 0
diff --git a/user/test/x86/emulator.c b/user/test/x86/emulator.c
index d3fb999..54f7662 100644
--- a/user/test/x86/emulator.c
+++ b/user/test/x86/emulator.c
@@ -23,7 +23,6 @@ void test_cmps(void *mem)
        unsigned char m3[1024];
        void *rsi, *rdi;
        long rcx, tmp;
-       int i;
 
        for (int i = 0; i < 100; ++i)
                m1[i] = m2[i] = m3[i] = i;
@@ -119,8 +118,8 @@ void test_push(void *mem)
                     "pushq (%[mem]) \n\t"
                     "mov %%rsp, %[new_stack_top] \n\t"
                     "mov %[tmp], %%rsp"
-                    : [new_stack_top]"=r"(new_stack_top)
-                    : [tmp]"r"(tmp), [stack_top]"r"(stack_top),
+                    : [tmp]"=&r"(tmp), [new_stack_top]"=r"(new_stack_top)
+                    : [stack_top]"r"(stack_top),
                       [reg]"r"(-17l), [mem]"r"(&memw)
                     : "memory");
 
diff --git a/user/test/x86/lib/printf.c b/user/test/x86/lib/printf.c
index 29249e5..f70eb1f 100644
--- a/user/test/x86/lib/printf.c
+++ b/user/test/x86/lib/printf.c
@@ -92,7 +92,6 @@ void print_unsigned(pstream_t *ps, unsigned long long n, int 
base)
 
 int vsnprintf(char *buf, int size, const char *fmt, va_list va)
 {
-    int n;
     pstream_t s;
 
     s.buffer = buf;

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
kvm-commits mailing list
kvm-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-commits

Reply via email to