Skip to content

Commit e7b28e1

Browse files
committed
cmake: clang: Disable deprecated non-prototype warning
Clang 15 added a new warning type `-Wdeprecated-non-prototype` that warns about the functions without prototypes, which have been deprecated since the C89 and will not work in the upcoming C2x. This commit disables the warning because Zephyr deliberately makes use of the functions without prototypes to allow the use of a "generic" function pointer (notoriously in the cbprintf implementation) and Zephyr will not move to the C2x in the foreseeable future. Signed-off-by: Stephanos Ioannidis <[email protected]> (cherry picked from commit 0a63ca6)
1 parent 0ca7bdf commit e7b28e1

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

cmake/compiler/clang/compiler_flags.cmake

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ check_set_compiler_property(PROPERTY warning_base
2929
-Wno-main
3030
-Wno-unused-but-set-variable
3131
-Wno-typedef-redefinition
32+
-Wno-deprecated-non-prototype
3233
)
3334

3435
check_set_compiler_property(APPEND PROPERTY warning_base -Wno-pointer-sign)

0 commit comments

Comments
 (0)