mirror of
https://github.com/alexhopeoconnor/firmware.git
synced 2026-10-14 15:31:31 +10:00
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:
@@ -17,6 +17,9 @@ int32_t GenericThreadModule::runOnce()
|
||||
if (!enabled)
|
||||
return disable();
|
||||
|
||||
// Sample first-run gate: the body is where custom one-shot init goes. With logging compiled out (e.g.
|
||||
// DEBUG_MUTE) only the flag assignment is left, which cppcheck reads as a redundant condition.
|
||||
// cppcheck-suppress duplicateConditionalAssign
|
||||
if (firstTime) {
|
||||
// do something the first time we run
|
||||
firstTime = 0;
|
||||
|
||||
Reference in New Issue
Block a user