Open mmitch opened 3 years ago
:white_check_mark: Build fff 89-appveyor completed (commit https://github.com/meekrosoft/fff/commit/7e356d6225 by @mmitch)
I just opened a pull request to fix this warning, so you won't need to use FAKE_VALUE_FUNC0
anymore.
Your linked pull request does not resolve, did you mean https://github.com/meekrosoft/fff/pull/98?
Ah, yes, sorry.
I have applied your pull request to my project after reverting from FAKE_VALUE_FUNC0 to FAKE_VALUE_FUNC. See this branch here: https://github.com/mmitch/syndig/tree/warning-fix
While the GCC throws no pedantic errors after applying your patch, the clang build still fails.
If I understand correctly, #pragma GCC system_header
just disables the warnings, it does not fix anything about using the wrong macro.
I think it's better to fix the code (by using ..._FUNC0 over ..._FUNC) instead of disabling the warnings and thus the example in the documentation should be updated to that regard instead.
(I was unsure if I should reply here or over at your pull request.)
This is a documentation update:
Functions without arguments need FAKE_VALUE_FUNC0 instead of FAKE_VALUE_FUNC, otherwise C compiler will emit warnings like ISO C99 requires at least one argument for the "..." in a variadic macro.