Part 25: State / Flags - State Machine Fix and Compiler Warnings Cleanup

Part 25 tackles two important code quality issues. We enhance our state machine with proper on_enter and on_exit functions to fix a bug, then dive into compiler flags and clean up all the warnings in our codebase.

Compiler flags md file: https://github.com/ossf/wg-best-practices-os-developers/blob/main/docs/Compiler-Hardening-Guides/Compiler-Options-Hardening-Guide-for-C-and-C%2B%2B.md