spaxel/firmware
jedarden 7b6a3d89b2 test(runner): volatile-qualify setjmp loop index for -Wclobbered-clean build (bf-2k3o)
The per-test loop in main() spans the setjmp(g_test_jmp)/longjmp recovery
target: i is read (loop test + increment) on the longjmp-return path. gcc's
-Wclobbered (enabled under -Wall) flags exactly this loop-index-across-setjmp
shape. The build was clean today only coincidentally — the preceding qsort()
call biases gcc's register heuristic; an identical loop without it warns at
-O1/-O2 (verified). Qualify i as volatile per C11 7.13.2.1, the sanctioned
remedy (no pragma, no flag downgrade), with no behavior change. This is the
compile-cleanliness gate for the guard (parent bf-22vg).

Verified: gcc -std=c11 -Wall -Wextra -Wclobbered -Werror is clean at
-O0/-O1/-O2/-O3/-Os/-Og; make -C firmware/test test builds warning-free and
runs all 30 tests (exit 0). Only firmware/test/test_runner.c touched.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-07-04 02:29:01 -04:00
..
main fix(provision): re-broadcast SPAXEL READY every 1s during window 2026-06-05 18:23:25 -04:00
test test(runner): volatile-qualify setjmp loop index for -Wclobbered-clean build (bf-2k3o) 2026-07-04 02:29:01 -04:00
CMakeLists.txt feat(firmware): OTA SHA-256 verification and captive portal URL decoding 2026-03-28 19:56:11 -04:00
dependencies.lock Fix ESP-IDF 5.x firmware compilation for ESP32-S3 build 2026-04-14 15:35:03 -04:00
partitions.csv fix(firmware): redesign partition table for 4MB flash; fix flash size in esptool.js 2026-04-17 10:40:58 -04:00
sdkconfig.defaults fix(firmware): redesign partition table for 4MB flash; fix flash size in esptool.js 2026-04-17 10:40:58 -04:00