ThrowTheSwitch / Unity

Simple Unit Testing for C
ThrowTheSwitch.org
MIT License
4.02k stars 969 forks source link

Fix build when UNITY_USE_COMMAND_LINE_ARGS is enabled #728

Closed mchernosky closed 5 months ago

mchernosky commented 5 months ago

Turning on UNITY_USE_COMMAND_LINE_ARGS includes some new functions:

These functions don't have prototypes other than where they are defined. Because -Werror is enabled, this results in -Werror=missing-declarations failing the build.

Because these functions aren't used outside this file, the don't need prototypes and can just be declared static.

All the tests passed for me after this change.

Fixes https://github.com/ThrowTheSwitch/Unity/issues/727