Closed hecko closed 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
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.
cppcheck is throwing a syntax error in baudcheck.c