mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-12-27 10:01:39 -05:00
kbuild: uapi: fail header test on compiler warnings
Compiler warnings also indicate issues with the headers. Make sure they don't go unnoticed. Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de> Reviewed-by: Nicolas Schier <nsc@kernel.org> Link: https://lore.kernel.org/r/20250813-kbuild-hdrtest-fixes-v2-2-8a7921ca3a03@linutronix.de Signed-off-by: Nathan Chancellor <nathan@kernel.org>
This commit is contained in:
committed by
Nathan Chancellor
parent
d4b7080be2
commit
3788d69db1
@@ -80,7 +80,7 @@ always-y := $(patsubst $(obj)/%.h,%.hdrtest, $(shell find $(obj) -name '*.h' 2>/
|
||||
# Include the header twice to detect missing include guard.
|
||||
quiet_cmd_hdrtest = HDRTEST $<
|
||||
cmd_hdrtest = \
|
||||
$(CC) $(c_flags) -fsyntax-only -x c /dev/null \
|
||||
$(CC) $(c_flags) -fsyntax-only -Werror -x c /dev/null \
|
||||
$(if $(filter-out $(no-header-test), $*.h), -include $< -include $<); \
|
||||
$(PERL) $(src)/headers_check.pl $(obj) $<; \
|
||||
touch $@
|
||||
|
||||
Reference in New Issue
Block a user