From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=33497 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P3bd1-0000VJ-Nn for qemu-devel@nongnu.org; Wed, 06 Oct 2010 17:34:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1P3bd0-00074U-3j for qemu-devel@nongnu.org; Wed, 06 Oct 2010 17:34:22 -0400 Received: from mail-qy0-f180.google.com ([209.85.216.180]:49541) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1P3bd0-00074O-0z for qemu-devel@nongnu.org; Wed, 06 Oct 2010 17:34:22 -0400 Received: by qyk1 with SMTP id 1so47172qyk.4 for ; Wed, 06 Oct 2010 14:34:21 -0700 (PDT) MIME-Version: 1.0 From: Blue Swirl Date: Wed, 6 Oct 2010 21:34:01 +0000 Message-ID: Content-Type: text/plain; charset=UTF-8 Subject: [Qemu-devel] [PATCH 09/11] i386: avoid a write only variable List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel Compiling with GCC 4.6.0 20100925 produced warnings: /src/qemu/target-i386/op_helper.c: In function 'switch_tss': /src/qemu/target-i386/op_helper.c:283:53: error: variable 'new_trap' set but not used [-Werror=unused-but-set-variable] Fix by deleting the variable. Alternatively the flag could be implemented by generating a debug exception if the flag is set. Signed-off-by: Blue Swirl --- target-i386/op_helper.c | 4 +--- 1 files changed, 1 insertions(+), 3 deletions(-) diff --git a/target-i386/op_helper.c b/target-i386/op_helper.c index ec6b3e9..a5462a9 100644 --- a/target-i386/op_helper.c +++ b/target-i386/op_helper.c @@ -280,7 +280,7 @@ static void switch_tss(int tss_selector, int tss_limit, tss_limit_max, type, old_tss_limit_max, old_type, v1, v2, i; target_ulong tss_base; uint32_t new_regs[8], new_segs[6]; - uint32_t new_eflags, new_eip, new_cr3, new_ldt, new_trap; + uint32_t new_eflags, new_eip, new_cr3, new_ldt; uint32_t old_eflags, eflags_mask; SegmentCache *dt; int index; @@ -334,7 +334,6 @@ static void switch_tss(int tss_selector, for(i = 0; i < 6; i++) new_segs[i] = lduw_kernel(tss_base + (0x48 + i * 4)); new_ldt = lduw_kernel(tss_base + 0x60); - new_trap = ldl_kernel(tss_base + 0x64); } else { /* 16 bit */ new_cr3 = 0; @@ -347,7 +346,6 @@ static void switch_tss(int tss_selector, new_ldt = lduw_kernel(tss_base + 0x2a); new_segs[R_FS] = 0; new_segs[R_GS] = 0; - new_trap = 0; } /* NOTE: we must avoid memory exceptions during the task switch, -- 1.6.2.4