summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBlue Swirl <blauwirbel@gmail.com>2010-10-13 18:38:08 +0000
committerBlue Swirl <blauwirbel@gmail.com>2010-10-13 18:43:19 +0000
commit4581cbcdc3c70fa94c729da7e25c6a152936cfd3 (patch)
treed4242721ab5f3416183926b892302f62af5caf83
parent2ded6ad761613e01d4690f290771961ba690d17e (diff)
downloadhqemu-4581cbcdc3c70fa94c729da7e25c6a152936cfd3.zip
hqemu-4581cbcdc3c70fa94c729da7e25c6a152936cfd3.tar.gz
i386: avoid a write only variable
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 adding a dummy cast so that the variable is not unused. Add also pointer to docs. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
-rw-r--r--target-i386/op_helper.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/target-i386/op_helper.c b/target-i386/op_helper.c
index ec6b3e9..43fbd0c 100644
--- a/target-i386/op_helper.c
+++ b/target-i386/op_helper.c
@@ -349,6 +349,10 @@ static void switch_tss(int tss_selector,
new_segs[R_GS] = 0;
new_trap = 0;
}
+ /* XXX: avoid a compiler warning, see
+ http://support.amd.com/us/Processor_TechDocs/24593.pdf
+ chapters 12.2.5 and 13.2.4 on how to implement TSS Trap bit */
+ (void)new_trap;
/* NOTE: we must avoid memory exceptions during the task switch,
so we make dummy accesses before */
OpenPOWER on IntegriCloud