blob: 6f4297dd40905c71150fff987048d28e0263eed1 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
|
Compilation Error: hw/virtio/dataplane/vring.c:400:5: error: ‘ret’ may be used uninitialised in this function
Qemu git-cloned from mo. 13.01.14 (ca. 13:00 GMT), Version 1.7.50
#git clone git://git.qemu-project.org/qemu.git
# cd qemu; git submodule update --init dtc
#./configure --disable-xen --enable-kvm
...No Errors...
#CC="ccache gcc" make -j8
....
GEN qemu.1
Signing optionrom/kvmvapic.bin
GEN qemu-img.1
CC qapi-types.o
hw/virtio/dataplane/vring.c: In function ‘vring_pop’:
hw/virtio/dataplane/vring.c:400:5: error: ‘ret’ may be used uninitialised in this function [-Werror=uninitialized]
cc1: all warnings being treated as errors
make: *** [hw/virtio/dataplane/vring.o] Error 1
make: *** Waiting for unfinished jobs....
Thx.
What compiler is this? The variable is quite obviously initialized before that line.
On 13 January 2014 14:40, Paolo Bonzini <email address hidden> wrote:
> What compiler is this? The variable is quite obviously initialized
> before that line.
The issue is that one of the code paths has a shadowing declaration
of 'ret' which is what gets assigned to, and so in that code path
the compiler is correct that the outer 'ret' is not assigned to.
Stefan said he was going to send out a fix for this.
thanks
-- PMM
A fix has been posted to the mailing list and will soon be merged into qemu.git:
http://thread.gmane.org/gmane.comp.emulators.qemu/250657
Thanks a lot.
Fix had been included here:
http://git.qemu.org/?p=qemu.git;a=commitdiff;h=385c04d0b66917457b6
... thus marking this ticked as fixed.
|