[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-commits] [COMMIT d7f2aff] Workaround compiler warnings at -O1
From: |
Anthony Liguori |
Subject: |
[Qemu-commits] [COMMIT d7f2aff] Workaround compiler warnings at -O1 |
Date: |
Sat, 09 May 2009 22:24:05 -0000 |
From: Paul Brook <address@hidden>
Signed-off-by: Paul Brook <address@hidden>
diff --git a/qemu-io.c b/qemu-io.c
index 60464e6..f0a17b9 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) {
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Qemu-commits] [COMMIT d7f2aff] Workaround compiler warnings at -O1,
Anthony Liguori <=