(chores) cleanup some compiler warnings

* switch-cases that fall through
* potential buffer overflow in improv.cpp
* potentially uninitialized variables in FX.cpp
* potential array out-of-range on segment::col[]
* minor optimization: only apply gamma correction when result is needed
* tag some possibly unused variables with   [[maybe_unused]]
This commit is contained in:
Frank
2026-03-11 13:54:58 +01:00
parent b994cf5b95
commit 49130c9ec9
13 changed files with 26 additions and 23 deletions

View File

@@ -9376,9 +9376,9 @@ uint16_t mode_particlefireworks(void) {
// check each rocket's state and emit particles according to its state: moving up = emit exhaust, at top = explode; falling down = standby time
uint32_t emitparticles, frequency, baseangle, hueincrement; // number of particles to emit for each rocket's state
// variables for circular explosions
[[maybe_unused]] int32_t speed, currentspeed, speedvariation, percircle;
[[maybe_unused]] int32_t speed = 0, currentspeed, speedvariation, percircle;
int32_t counter = 0;
[[maybe_unused]] uint16_t angle;
[[maybe_unused]] uint16_t angle = 0;
[[maybe_unused]] unsigned angleincrement;
bool circularexplosion = false;