Unverified Commit 3788d69d authored by Thomas Weißschuh's avatar Thomas Weißschuh Committed by Nathan Chancellor
Browse files

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: default avatarThomas Weißschuh <thomas.weissschuh@linutronix.de>
Reviewed-by: default avatarNicolas Schier <nsc@kernel.org>
Link: https://lore.kernel.org/r/20250813-kbuild-hdrtest-fixes-v2-2-8a7921ca3a03@linutronix.de


Signed-off-by: default avatarNathan Chancellor <nathan@kernel.org>
parent d4b7080b
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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 $@