Address STM32 cppcheck warnings (#11314)

- Suppress GenericThreadModule warning when DEBUG_MUTE
- Suppress warning stemming from check_skip_packages
- Cast pointers to uint32_t before subtracting to avoid cppcheck warning
This commit is contained in:
Austin
2026-08-01 00:28:01 +00:00
committed by GitHub
parent 5bfad255e0
commit 85c1bd4836
3 files changed
+10 -1

No files matched your search

+3
View File
@@ -61,6 +61,9 @@
#define LL_ADC_RESOLUTION LL_ADC_DS_DATA_WIDTH_12_BIT
#define BATTERY_SENSE_RESOLUTION_BITS 12
#else
// The ST HAL headers that define these are outside cppcheck's include path (check_skip_packages), so static
// analysis always lands here even though real builds resolve one of the branches above.
// cppcheck-suppress preprocessorErrorDirective
#error "ADC resolution could not be defined!"
#endif
#define ADC_RANGE (1 << BATTERY_SENSE_RESOLUTION_BITS)