summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorStefan Weil <weil@mail.berlios.de>2009-12-14 10:54:49 +0100
committerAurelien Jarno <aurelien@aurel32.net>2009-12-16 18:26:28 +0100
commit212df029754caabba45f941fbd22ec219b934ef9 (patch)
treece1cf074bc61cc7c0fc44ac9d3cd951ea5d5ec9b
parent5a2b3fc5aaae48859e09a8d96f4f92578b060892 (diff)
downloadfocaccia-qemu-212df029754caabba45f941fbd22ec219b934ef9.tar.gz
focaccia-qemu-212df029754caabba45f941fbd22ec219b934ef9.zip
target-alpha: Fix compiler warning for gcc-4.3 (and older)
"Old" compilers obviously are not able to recognise
that all cases are handled here:

qemu/target-alpha/helper.c:70: error: ‘round_mode’ may be used uninitialized in this function

A small modification helps the compiler to do its jobs.

gcc-4.4 does not need this, but is still not standard on all platforms.

Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Acked-by: Laurent Desnogues <laurent.desnogues@gmail.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
-rw-r--r--target-alpha/helper.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/target-alpha/helper.c b/target-alpha/helper.c
index a658f9782a..be7d37b0d9 100644
--- a/target-alpha/helper.c
+++ b/target-alpha/helper.c
@@ -95,6 +95,7 @@ void cpu_alpha_store_fpcr (CPUState *env, uint64_t val)
         round_mode = float_round_nearest_even;
         break;
     case 3:
+    default: /* this avoids a gcc (< 4.4) warning */
         round_mode = float_round_up;
         break;
     }