Optiboot / optiboot

Small and Fast Bootloader for Arduino and other Atmel AVR chips
Other
1.09k stars 401 forks source link

C syntax error in baudcheck.c #363

Closed hecko closed 1 year ago

hecko commented 1 year ago

cppcheck is throwing a syntax error in baudcheck.c

maco@lists:~/git/optiboot/optiboot/bootloaders/optiboot$ cppcheck --force *.c *.h
Checking baudcheck.c ...
baudcheck.c:25:13: error: syntax error: /} [syntaxError]
bps=${bpsx/L/}
            ^
Checking baudcheck.c: SINGLESPEED...
1/9 files checked 0% done
Checking boot_opt.h ...
Checking boot_opt.h: __SPM_REG...
2/9 files checked 2% done
Checking optiboot.c ...
3/9 files checked 31% done
Checking optiboot_x.c ...
4/9 files checked 44% done
Checking pin_defs.h ...
5/9 files checked 62% done
Checking pin_defs_x.h ...
6/9 files checked 72% done
Checking pins_rs485.h ...
Checking pins_rs485.h: __AVR_XMEGA__...
7/9 files checked 89% done
Checking pins_softuart.h ...
8/9 files checked 99% done
Checking stk500.h ...
9/9 files checked 100% done
WestfW commented 1 year ago

baudcheck.c is not a real C program. It gets run through the preprocessor to create a shell script. It should be omitted from any automated syntax checking.