Skip to content

Commit 063d848

Browse files
committed
main: fix use of definition after branch
The C committee fixed this in C23 because they too thought it was idiotic.
1 parent 6f7f238 commit 063d848

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/cyanrip_main.c

+4-3
Original file line numberDiff line numberDiff line change
@@ -1449,6 +1449,7 @@ int main(int argc, char **argv)
14491449
int track_metadata_ptr_cnt = 0;
14501450
int find_drive_offset_range = 0;
14511451
int offset_set = 0;
1452+
int img_size = -1;
14521453

14531454
CRIPArt cover_arts[32] = { 0 };
14541455
int nb_cover_arts = 0;
@@ -1560,8 +1561,8 @@ int main(int argc, char **argv)
15601561
settings.disable_coverart_db = 1;
15611562
break;
15621563
case 'm':
1563-
long size = strtol(optarg, NULL, 10);
1564-
switch(size) {
1564+
img_size = strtol(optarg, NULL, 10);
1565+
switch (img_size) {
15651566
case -1:
15661567
settings.coverart_lookup_size = COVERART_LOOKUP_SIZE_ORIGINAL;
15671568
break;
@@ -1575,7 +1576,7 @@ int main(int argc, char **argv)
15751576
settings.coverart_lookup_size = COVERART_LOOKUP_SIZE_1200;
15761577
break;
15771578
default:
1578-
cyanrip_log(ctx, 0, "Invalid max coverart max size %i (must be 250, 500 or 1200)\n", size);
1579+
cyanrip_log(ctx, 0, "Invalid max coverart max size %i (must be 250, 500 or 1200)\n", img_size);
15791580
return 1;
15801581
}
15811582
break;

0 commit comments

Comments
 (0)