Skip to content

Conversation

@mmitch
Copy link

@mmitch mmitch commented Nov 25, 2020

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.

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
@AppVeyorBot
Copy link

Build fff 89-appveyor completed (commit 7e356d6225 by @mmitch)

@rubiot
Copy link
Contributor

rubiot commented Apr 14, 2021

I just opened a pull request to fix this warning, so you won't need to use FAKE_VALUE_FUNC0 anymore.

@mmitch
Copy link
Author

mmitch commented Apr 16, 2021

Your linked pull request does not resolve, did you mean #98?

@rubiot
Copy link
Contributor

rubiot commented Apr 16, 2021

Ah, yes, sorry.

@mmitch
Copy link
Author

mmitch commented Apr 24, 2021

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.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants