dbgutil.c: use C89-compatible variable declarations.
This commit is contained in:
parent
549f5b2c4d
commit
e8005d43c6
1 changed files with 5 additions and 2 deletions
|
@ -184,6 +184,7 @@ int load_png(struct quirc *q, const char *filename)
|
||||||
FILE *infile = NULL;
|
FILE *infile = NULL;
|
||||||
uint8_t *image;
|
uint8_t *image;
|
||||||
int ret = -1;
|
int ret = -1;
|
||||||
|
int pass;
|
||||||
|
|
||||||
if ((infile = fopen(filename, "rb")) == NULL)
|
if ((infile = fopen(filename, "rb")) == NULL)
|
||||||
goto out;
|
goto out;
|
||||||
|
@ -248,8 +249,10 @@ int load_png(struct quirc *q, const char *filename)
|
||||||
|
|
||||||
image = quirc_begin(q, NULL, NULL);
|
image = quirc_begin(q, NULL, NULL);
|
||||||
|
|
||||||
for (int pass = 0; pass < number_passes; pass++) {
|
for (pass = 0; pass < number_passes; pass++) {
|
||||||
for (int y = 0; y < height; y++) {
|
int y;
|
||||||
|
|
||||||
|
for (y = 0; y < height; y++) {
|
||||||
png_bytep row_pointer = image + y * width;
|
png_bytep row_pointer = image + y * width;
|
||||||
png_read_rows(png_ptr, &row_pointer, NULL, 1);
|
png_read_rows(png_ptr, &row_pointer, NULL, 1);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue