From: Blue Swirl Date: Wed, 23 Dec 2009 15:35:17 +0000 (+0000) Subject: qemu-io: suppress a warning with gcc 4.0.2 X-Git-Tag: v0.13.0-rc0~1835 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=6474bd6909eb14f89081ae7199ab0ed1bc5211b1;p=thirdparty%2Fqemu.git qemu-io: suppress a warning with gcc 4.0.2 Signed-off-by: Blue Swirl --- diff --git a/qemu-io.c b/qemu-io.c index aa26e36b85b..1c19b92c0ac 100644 --- a/qemu-io.c +++ b/qemu-io.c @@ -492,7 +492,8 @@ readv_f(int argc, char **argv) int c, cnt; char *buf; int64_t offset; - int total; + /* Some compilers get confused and warn if this is not initialized. */ + int total = 0; int nr_iov; QEMUIOVector qiov; int pattern = 0; @@ -747,7 +748,8 @@ writev_f(int argc, char **argv) int c, cnt; char *buf; int64_t offset; - int total; + /* Some compilers get confused and warn if this is not initialized. */ + int total = 0; int nr_iov; int pattern = 0xcd; QEMUIOVector qiov;