From 3093fcaf74082dc25e2ed86d1e9997c2115b6bbb Mon Sep 17 00:00:00 2001 From: Stephanos Ioannidis Date: Thu, 8 Sep 2022 20:28:34 +0900 Subject: [PATCH] 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 --- cmake/compiler/clang/compiler_flags.cmake | 1 + 1 file changed, 1 insertion(+) diff --git a/cmake/compiler/clang/compiler_flags.cmake b/cmake/compiler/clang/compiler_flags.cmake index f4d5a6530173f..ce0c8b17fe966 100644 --- a/cmake/compiler/clang/compiler_flags.cmake +++ b/cmake/compiler/clang/compiler_flags.cmake @@ -29,6 +29,7 @@ check_set_compiler_property(PROPERTY warning_base -Wno-main -Wno-unused-but-set-variable -Wno-typedef-redefinition + -Wno-deprecated-non-prototype ) check_set_compiler_property(APPEND PROPERTY warning_base -Wno-pointer-sign)