Skip to content
Prev Previous commit
Next Next commit
Avoid branch-past-initialisation warning
IAR generates warning Pe546 'transfer of control bypasses initialization
of variable'.
  • Loading branch information
Ben Avison committed Sep 13, 2022
commit 22bf0691517c942ed591026b283f0ce77bb080e0
3 changes: 2 additions & 1 deletion adc/adc_console/adc_console.c
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ int main(void) {
printf("%03x\n", sample_buf[i]);
break;
}
case 'w':
case 'w': {
printf("\nPress any key to stop wiggling\n");
int i = 1;
gpio_set_dir_all_bits(-1);
Expand All @@ -85,6 +85,7 @@ int main(void) {
gpio_set_dir_all_bits(0);
printf("Wiggling halted.\n");
break;
}
case '\n':
case '\r':
break;
Expand Down