[PATCH 3/6] kbuild: uapi: fail header test on compiler warnings

Thomas Weißschuh posted 6 patches 1 month, 3 weeks ago
There is a newer version of this series
[PATCH 3/6] kbuild: uapi: fail header test on compiler warnings
Posted by Thomas Weißschuh 1 month, 3 weeks ago
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>
---
 usr/include/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/usr/include/Makefile b/usr/include/Makefile
index 6868d183f36d532cd3d4023b936c67b8a58a9ba5..2846fe216ee4f2054effbfbb5778b4e5b24649ae 100644
--- a/usr/include/Makefile
+++ b/usr/include/Makefile
@@ -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 $@

-- 
2.50.1