summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Brook <paul@codesourcery.com>2009-05-09 23:21:39 +0100
committerPaul Brook <paul@codesourcery.com>2009-05-09 23:22:35 +0100
commitd4ec5228821b8bdd8019cb5dafa2ea3659ddb1f9 (patch)
treed7f2affed4ba0909dba915b368743d0d59a7f901
parentFixe ARM NEON vrshl. (diff)
downloadqemu-kvm-d4ec5228821b8bdd8019cb5dafa2ea3659ddb1f9.tar.gz
qemu-kvm-d4ec5228821b8bdd8019cb5dafa2ea3659ddb1f9.tar.bz2
qemu-kvm-d4ec5228821b8bdd8019cb5dafa2ea3659ddb1f9.zip
Workaround compiler warnings at -O1
Signed-off-by: Paul Brook <paul@codesourcery.com>
-rw-r--r--qemu-io.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/qemu-io.c b/qemu-io.c
index 60464e6ab..f0a17b986 100644
--- a/qemu-io.c
+++ b/qemu-io.c
@@ -210,7 +210,9 @@ read_f(int argc, char **argv)
int c, cnt;
char *buf;
int64_t offset;
- int count, total;
+ int count;
+ /* Some compilers get confused and warn if this is not initialized. */
+ int total = 0;
int pattern = 0, pattern_offset = 0, pattern_count = 0;
while ((c = getopt(argc, argv, "Cl:pP:qs:v")) != EOF) {
@@ -527,7 +529,9 @@ write_f(int argc, char **argv)
int c, cnt;
char *buf;
int64_t offset;
- int count, total;
+ int count;
+ /* Some compilers get confused and warn if this is not initialized. */
+ int total = 0;
int pattern = 0xcd;
while ((c = getopt(argc, argv, "CpP:q")) != EOF) {