qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] s390x: silence warning from GCC on uninitialize


From: Stefan Weil
Subject: Re: [Qemu-devel] [PATCH] s390x: silence warning from GCC on uninitialized values
Date: Mon, 04 Feb 2013 22:57:43 +0100
User-agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130106 Thunderbird/17.0.2

Am 04.02.2013 22:23, schrieb Anthony Liguori:
> 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
>

Yes, this is a false positive. A better compiler will complain when your
patch was applied because addr, mask are assigned values which are
never used...

Would it be possible to completely eliminate variable "found" and
move the DPRINTF, load_psw statements into the for loop (just before
the break statement)?

Stefan W.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]