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

[Xen-changelog] [qemu-xen-4.2-testing] qemu-traditional: Fix build warnings on Wheezy



commit 8d7e96f625c4a58d721db413b032fd0bb5671b96
Author:     Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
AuthorDate: Wed Dec 18 15:25:14 2013 +0000
Commit:     Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
CommitDate: Thu Jan 9 12:44:42 2014 +0000

    qemu-traditional: Fix build warnings on Wheezy
    
      CC    i386-dm/eepro100.o
    hw/eepro100.c: In function â??eepro100_read4â??:
    hw/eepro100.c:1232:5: warning: â??valâ?? may be used uninitialized in this 
function [-Wmaybe-uninitialized]
    hw/eepro100.c: In function â??eepro100_read2â??:
    hw/eepro100.c:1202:5: warning: â??valâ?? may be used uninitialized in this 
function [-Wmaybe-uninitialized]
    hw/eepro100.c: In function â??eepro100_read1â??:
    hw/eepro100.c:1179:5: warning: â??valâ?? may be used uninitialized in this 
function [-Wmaybe-uninitialized]
    
    Use ~0 to match the behaviour of real hardware.
    
    Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
    CC: Ian Campbell <Ian.Campbell@xxxxxxxxxx>
    Acked-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
    (cherry picked from commit 7f5b3c338e0f8938ba575dec18255dcbee0c2ee2)
    (cherry picked from commit 044c9e608e67defea4fc9c9ef4286e85a99d68c2)
---
 hw/eepro100.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/hw/eepro100.c b/hw/eepro100.c
index bc6c3d5..d172b91 100644
--- a/hw/eepro100.c
+++ b/hw/eepro100.c
@@ -1136,7 +1136,7 @@ static void eepro100_write_port(EEPRO100State * s, 
uint32_t val)
 
 static uint8_t eepro100_read1(EEPRO100State * s, uint32_t addr)
 {
-    uint8_t val;
+    uint8_t val = ~0;
     if (addr <= sizeof(s->mem) - sizeof(val)) {
         memcpy(&val, &s->mem[addr], sizeof(val));
     }
@@ -1181,7 +1181,7 @@ static uint8_t eepro100_read1(EEPRO100State * s, uint32_t 
addr)
 
 static uint16_t eepro100_read2(EEPRO100State * s, uint32_t addr)
 {
-    uint16_t val;
+    uint16_t val = ~0;
     if (addr <= sizeof(s->mem) - sizeof(val)) {
         memcpy(&val, &s->mem[addr], sizeof(val));
     }
@@ -1204,7 +1204,7 @@ static uint16_t eepro100_read2(EEPRO100State * s, 
uint32_t addr)
 
 static uint32_t eepro100_read4(EEPRO100State * s, uint32_t addr)
 {
-    uint32_t val;
+    uint32_t val = ~0U;
     if (addr <= sizeof(s->mem) - sizeof(val)) {
         memcpy(&val, &s->mem[addr], sizeof(val));
     }
--
generated by git-patchbot for /home/xen/git/qemu-xen-4.2-testing.git

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.