[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] cirrus_vga: uninitialized variable warnings
From: |
Blue Swirl |
Subject: |
[Qemu-devel] cirrus_vga: uninitialized variable warnings |
Date: |
Thu, 6 Jan 2011 19:45:01 +0000 |
There are a few variables which appear uninitialized to GCC 4.6.0:
CC i386-softmmu/cirrus_vga.o
/src/qemu/hw/cirrus_vga.c: In function 'cirrus_bitblt_start':
/src/qemu/hw/cirrus_vga.c:678: warning: 'depth' may be used
uninitialized in this function
/src/qemu/hw/cirrus_vga.c:678: note: 'depth' was declared here
/src/qemu/hw/cirrus_vga.c:677: warning: 'dx' may be used uninitialized
in this function
/src/qemu/hw/cirrus_vga.c:677: note: 'dx' was declared here
/src/qemu/hw/cirrus_vga.c:676: warning: 'sx' may be used uninitialized
in this function
/src/qemu/hw/cirrus_vga.c:676: note: 'sx' was declared here
/src/qemu/hw/cirrus_vga.c:676: warning: 'sy' may be used uninitialized
in this function
/src/qemu/hw/cirrus_vga.c:676: note: 'sy' was declared here
/src/qemu/hw/cirrus_vga.c:677: warning: 'dy' may be used uninitialized
in this function
/src/qemu/hw/cirrus_vga.c:677: note: 'dy' was declared here
I don't think they are, since the variable use is conditional to
notify variable:
if (notify)
qemu_console_copy(s->vga.ds,
sx, sy, dx, dy,
s->cirrus_blt_width / depth,
s->cirrus_blt_height);
Perhaps the code could be rearranged to avoid the warnings? Otherwise
we could add zero initializers.
- [Qemu-devel] cirrus_vga: uninitialized variable warnings,
Blue Swirl <=