Skip to content

Commit 3ee2336

Browse files
morrisonleviclaude
andcommitted
fix(appsec): pass __VA_ARGS__ through CONFIG to SYSCFG to avoid empty variadic
clang 19 with -Werror,-Wc23-extensions rejects calling a variadic macro with no argument for '...'. CONFIG's body called SYSCFG(type, name) with only 2 args. Pass CONFIG's own __VA_ARGS__ through instead — CONFIG is always called with at least a default value, so the variadic arg is never empty. SYSCFG ignores the extra args in this context anyway. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 27fc984 commit 3ee2336

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

appsec/cmake/extension.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND CMAKE_CXX_COMPILER_VERSION VERSION_L
5656
target_compile_options(extension PRIVATE -Wall)
5757
else()
5858
target_compile_options(extension PRIVATE -Wall -Wextra $<$<COMPILE_LANGUAGE:C>:-pedantic>
59-
-Werror -Wno-nullability-extension -Wno-gnu-zero-variadic-macro-arguments
59+
-Werror -Wno-nullability-extension -Wno-gnu-zero-variadic-macro-arguments -Wno-c23-extensions
6060
-Wno-gnu-auto-type -Wno-language-extension-token
6161
$<$<COMPILE_LANGUAGE:CXX>:-Wno-missing-field-initializers>)
6262
endif()

appsec/src/extension/.clang-tidy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
Checks: '-fuchsia-trailing-return,-hicpp-vararg,-cppcoreguidelines-pro-type-vararg,-clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling,-cppcoreguidelines-pro-bounds-array-to-pointer-decay'
1+
Checks: '-fuchsia-trailing-return,-hicpp-vararg,-cppcoreguidelines-pro-type-vararg,-clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling,-cppcoreguidelines-pro-bounds-array-to-pointer-decay,-clang-diagnostic-c23-extensions'
22

33
InheritParentConfig: true

appsec/src/extension/configuration.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ typedef enum { DD_CONFIGURATION } dd_config_id;
116116
zai_config_memoized_entries[DDAPPSEC_CONFIG_##name].decoded_value)
117117
#define CONFIG(type, name, ...) \
118118
type(get_##name, *zai_config_get_value(DDAPPSEC_CONFIG_##name)) \
119-
SYSCFG(type, name)
119+
SYSCFG(type, name, __VA_ARGS__)
120120
DD_CONFIGURATION
121121
#undef CONFIG
122122
#undef SYSCFG

0 commit comments

Comments
 (0)