Workaround compiler warnings at -O1

Signed-off-by: Paul Brook <paul@codesourcery.com>
This commit is contained in:
Paul Brook 2009-05-09 23:21:39 +01:00
parent cb76e138d3
commit d4ec522882

View file

@ -210,7 +210,9 @@ read_f(int argc, char **argv)
int c, cnt; int c, cnt;
char *buf; char *buf;
int64_t offset; 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; int pattern = 0, pattern_offset = 0, pattern_count = 0;
while ((c = getopt(argc, argv, "Cl:pP:qs:v")) != EOF) { while ((c = getopt(argc, argv, "Cl:pP:qs:v")) != EOF) {
@ -527,7 +529,9 @@ write_f(int argc, char **argv)
int c, cnt; int c, cnt;
char *buf; char *buf;
int64_t offset; 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; int pattern = 0xcd;
while ((c = getopt(argc, argv, "CpP:q")) != EOF) { while ((c = getopt(argc, argv, "CpP:q")) != EOF) {