Commit b2ae5581

b2ae55818990Merged

Test User <[email protected]> · 7 months ago · 1 file · ~1 modified

Description

Fix uninitialized C_TMP variable in EXIT trap

The EXIT trap on line 82 references $C_TMP, but it is only assigned later on line 108 (when not in -S or -c mode). If the script exits early — e.g., parse failure or stdout mode — $C_TMP is unset.

While most POSIX shells expand an unset variable to an empty string (and rm -f "" is harmless), this is still incorrect and could fail under set -u or strict shells. Initialize C_TMP="" before the trap.

Co-Authored-By: Claude Opus 4.7 [email protected]

Details

Commit
b2ae55818990
Parent
2c4077fae71b

spinelmodifiedView file

@@ -38,6 +38,7 @@
3838 OPT_LEVEL="2"
3939 CC_CMD="cc"
4040 EXTRA_FLAGS=""
41+C_TMP=""
4142
4243 while [ $# -gt 0 ]; do
4344 case "$1" in