aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarvey Harrison <harvey.harrison@gmail.com>2008-02-19 13:43:11 -0500
committerAvi Kivity <avi@qumranet.com>2008-04-27 04:53:24 -0400
commit77cd337f2246ae72915538383e8f5a6b7ffb363d (patch)
treec810a1dba3ca581854fb4c790d6c39270a3c4443
parentf11c3a8d84d7bf091bf963edd7104dd4ba6416c3 (diff)
KVM: x86 emulator: fix sparse warnings in x86_emulate.c
Nesting __emulate_2op_nobyte inside__emulate_2op produces many shadowed variable warnings on the internal variable _tmp used by both macros. Change the outer macro to use __tmp. Avoids a sparse warning like the following at every call site of __emulate_2op arch/x86/kvm/x86_emulate.c:1091:3: warning: symbol '_tmp' shadows an earlier one arch/x86/kvm/x86_emulate.c:1091:3: originally declared here [18 more warnings suppressed] Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> Signed-off-by: Avi Kivity <avi@qumranet.com>
-rw-r--r--arch/x86/kvm/x86_emulate.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/x86/kvm/x86_emulate.c b/arch/x86/kvm/x86_emulate.c
index cacdcf5f32d7..f59ed93f5d24 100644
--- a/arch/x86/kvm/x86_emulate.c
+++ b/arch/x86/kvm/x86_emulate.c
@@ -371,7 +371,7 @@ static u16 group2_table[] = {
371 371
372#define __emulate_2op(_op,_src,_dst,_eflags,_bx,_by,_wx,_wy,_lx,_ly,_qx,_qy) \ 372#define __emulate_2op(_op,_src,_dst,_eflags,_bx,_by,_wx,_wy,_lx,_ly,_qx,_qy) \
373 do { \ 373 do { \
374 unsigned long _tmp; \ 374 unsigned long __tmp; \
375 switch ((_dst).bytes) { \ 375 switch ((_dst).bytes) { \
376 case 1: \ 376 case 1: \
377 __asm__ __volatile__ ( \ 377 __asm__ __volatile__ ( \
@@ -379,7 +379,7 @@ static u16 group2_table[] = {
379 _op"b %"_bx"3,%1; " \ 379 _op"b %"_bx"3,%1; " \
380 _POST_EFLAGS("0", "4", "2") \ 380 _POST_EFLAGS("0", "4", "2") \
381 : "=m" (_eflags), "=m" ((_dst).val), \ 381 : "=m" (_eflags), "=m" ((_dst).val), \
382 "=&r" (_tmp) \ 382 "=&r" (__tmp) \
383 : _by ((_src).val), "i" (EFLAGS_MASK)); \ 383 : _by ((_src).val), "i" (EFLAGS_MASK)); \
384 break; \ 384 break; \
385 default: \ 385 default: \