[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH] s390x: silence warning from GCC on uninitialized va
From: |
Anthony Liguori |
Subject: |
[Qemu-devel] [PATCH] s390x: silence warning from GCC on uninitialized values |
Date: |
Mon, 4 Feb 2013 15:23:59 -0600 |
As best I can tell, this is a false positive.
address@hidden qemu-s390]$ make
CC s390x-softmmu/target-s390x/helper.o
/home/aliguori/git/qemu/target-s390x/helper.c: In function ‘do_interrupt’:
/home/aliguori/git/qemu/target-s390x/helper.c:673:17: error: ‘addr’ may be
used uninitialized in this function [-Werror=maybe-uninitialized]
/home/aliguori/git/qemu/target-s390x/helper.c:620:20: note: ‘addr’ was
declared here
/home/aliguori/git/qemu/target-s390x/helper.c:673:17: error: ‘mask’ may be
used uninitialized in this function [-Werror=maybe-uninitialized]
/home/aliguori/git/qemu/target-s390x/helper.c:620:14: note: ‘mask’ was
declared here
cc1: all warnings being treated as errors
make[1]: *** [target-s390x/helper.o] Error 1
make: *** [subdir-s390x-softmmu] Error 2
Cc: Cornelia Huck <address@hidden>
Cc: Stefan Weil <address@hidden>
Signed-off-by: Anthony Liguori <address@hidden>
---
target-s390x/helper.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/target-s390x/helper.c b/target-s390x/helper.c
index 8bd84ef..043feb2 100644
--- a/target-s390x/helper.c
+++ b/target-s390x/helper.c
@@ -617,7 +617,7 @@ static void do_ext_interrupt(CPUS390XState *env)
static void do_io_interrupt(CPUS390XState *env)
{
- uint64_t mask, addr;
+ uint64_t mask = 0, addr = 0;
LowCore *lowcore;
IOIntQueue *q;
uint8_t isc;
--
1.8.0
- [Qemu-devel] [PATCH] s390x: silence warning from GCC on uninitialized values,
Anthony Liguori <=