[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] Qemu build failure with uninitialized variables when "-Wmay
[Qemu-devel] Qemu build failure with uninitialized variables when "-Wmaybe-uninitialized" is open
Thu, 28 Feb 2019 03:00:29 +0000
When we build qemu with "-Wmaybe-uninitialized" on, and got the following error
qobject/block-qdict.c: In function 'qdict_array_split':
qobject/block-qdict.c:259:25: error: 'subqdict' may be used uninitialized in
this function [-Werror=maybe-uninitialized]
qlist_append_obj(*dst, subqobj ?: QOBJECT(subqdict));
cc1: all warnings being treated as errors
make: *** [qobject/block-qdict.o] Error 1
It is because of the uninitialized variable subqdict function qdict_array_split.
Thanks to confirm it.
Below is the ENV Setting:
OS: RHEL OS 7.6
Qemu Version: commit c102d9471f8f02d9fbea72ec4505d7089173f470
CFLAGS Setting in env: export CFLAGS="-g -O3 -Wmaybe-uninitialized"
- [Qemu-devel] Qemu build failure with uninitialized variables when "-Wmaybe-uninitialized" is open,
Wei, Danmei <=