fix: drop extern "C" on main to clear -Wpedantic warning (-S4) #6
Reference in New Issue
Block a user
Delete Branch "fix/main-extern-c-pedantic-warning"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Eliminates the long-standing pedantic warning Kyle flagged on the bench build:
Background
extern "C" int main(void)predates any SKUDAK commit — upstream OpenInverter pattern. C++ forbids linkage specifications onmain, and with-pedanticin CPPFLAGS this fires every build.Fix
Drop the
extern "C". Confirmed safe:vector.c:35forward-declaresint main(void)with default linkage and invokes it at boot via symbol-name lookup.mainby name, not by linkage attribute.stm32-sineupstream has the same issue — same fix applies if we ever push upstream.Version bump
VERSTR-S3 → -S4. Verified in the built binary as4=1.20.R-S4so Kyle can confirm the right firmware is flashed.Drive-by
Added
.gitignorefor macOS.DS_Storefiles — one snuck into the initial commit on this branch.Build
Clean, no compiler warnings (only the long-standing linker RWX notice remains, unrelated).
Test plan
4=1.20.R-S4makeemits no-Wpedanticwarning🤖 Generated with Claude Code