The check builds header file as if it is a C file. Clang doesn't like the idea of having dead code in C file. The check as-is fails on Clang with unused function warnings.
We know for sure we don't care about those unused function warnings. Just ignore them. Signed-off-by: Wei Liu <[email protected]> --- Cc: Andrew Cooper <[email protected]> Cc: George Dunlap <[email protected]> Cc: Ian Jackson <[email protected]> Cc: Jan Beulich <[email protected]> Cc: Konrad Rzeszutek Wilk <[email protected]> Cc: Stefano Stabellini <[email protected]> Cc: Tim Deegan <[email protected]> Cc: Wei Liu <[email protected]> --- xen/include/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xen/include/Makefile b/xen/include/Makefile index 65a732a707..b0bacc99b5 100644 --- a/xen/include/Makefile +++ b/xen/include/Makefile @@ -111,7 +111,7 @@ headers.chk: $(PUBLIC_ANSI_HEADERS) Makefile headers99.chk: $(PUBLIC_C99_HEADERS) Makefile rm -f [email protected] $(foreach i, $(filter %.h,$^), \ - $(CC) -x c -std=c99 -Wall -Werror \ + $(CC) -x c -std=c99 -Wall -Werror -Wno-unused-function \ -include stdint.h $(foreach j, $($(i)-prereq), -include $(j).h) \ -S -o /dev/null $(i) \ || exit $$?; echo $(i) >> [email protected];) -- 2.11.0 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xen.org/xen-devel
