Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When macro
_SCMP_VA_NUM_ARGS
is invoked with one argument, it expands to_SCMP_VA_NUM_ARGS_IMPL
with only 3 arguments specified.Compilers like gcc and clang support empty variadic macro argument as a language extension, however, in ISO C, at least one argument should be specified for the
...
argument of a function-like macro (See ISO/IEC 9899:1999 6.10.3(4)).This patch should make the code more standard-compliant, and silences certain compiler warnings (e.g. clang
-Wgnu-zero-variadic-macro-arguments
)Note: there are other non-standard code (e.g. void pointer arithmetic), but not addressed in this patch. It's okay for projects to use language extensions, but less so in public headers.