]> git.proxmox.com Git - qemu.git/commitdiff
qemu-io: suppress a warning with gcc 4.0.2
authorBlue Swirl <blauwirbel@gmail.com>
Wed, 23 Dec 2009 15:35:17 +0000 (15:35 +0000)
committerBlue Swirl <blauwirbel@gmail.com>
Wed, 23 Dec 2009 15:35:17 +0000 (15:35 +0000)
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
qemu-io.c

index aa26e36b85bec15ef22b3c8153254c3650d5c134..1c19b92c0ac602bcf4a6defb860ea196f7b15696 100644 (file)
--- 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;