scripts: add -Wno-format KBUILD_CFLAGS for clang 16

clang update to 16 causes many compilation error: "format specifies
type 'unsigned int' but the argument has type 'unsigned long'
[-Werror,-Wformat]".

Add -Wno-format KBUILD_CFLAGS for clang 16 as a short term solution,
Will fix all build error in different modules as a long term solution
on newer clang.

Change-Id: I595ddb69180ce366fc24c15c914316e320624333
Signed-off-by: jianzhou <quic_jianzhou@quicinc.com>
This commit is contained in:
jianzhou 2022-12-21 06:18:02 -08:00
parent 3fa1fae1e5
commit f61cfe6e08

View file

@ -48,7 +48,7 @@ else
ifdef CONFIG_CC_IS_CLANG
KBUILD_CFLAGS += -Wno-initializer-overrides
# Clang before clang-16 would warn on default argument promotions.
ifneq ($(call clang-min-version, 160000),y)
ifneq ($(call clang-min-version, 170000),y)
# Disable -Wformat
KBUILD_CFLAGS += -Wno-format
# Then re-enable flags that were part of the -Wformat group that aren't