From e8005d43c683d22c5366e16f2b6477f8b3b00a51 Mon Sep 17 00:00:00 2001 From: Daniel Beer Date: Wed, 13 Jul 2016 08:54:52 +1200 Subject: [PATCH] dbgutil.c: use C89-compatible variable declarations. --- tests/dbgutil.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tests/dbgutil.c b/tests/dbgutil.c index 8720a94..282ee2f 100644 --- a/tests/dbgutil.c +++ b/tests/dbgutil.c @@ -184,6 +184,7 @@ int load_png(struct quirc *q, const char *filename) FILE *infile = NULL; uint8_t *image; int ret = -1; + int pass; if ((infile = fopen(filename, "rb")) == NULL) goto out; @@ -248,8 +249,10 @@ int load_png(struct quirc *q, const char *filename) image = quirc_begin(q, NULL, NULL); - for (int pass = 0; pass < number_passes; pass++) { - for (int y = 0; y < height; y++) { + for (pass = 0; pass < number_passes; pass++) { + int y; + + for (y = 0; y < height; y++) { png_bytep row_pointer = image + y * width; png_read_rows(png_ptr, &row_pointer, NULL, 1); }