xen: use a dummy file in C99 header check
PATCH 1/1 xen: use a dummy file in C99 header check
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.
Use a dummy file like the C++ header check to fix this.
---
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 | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
xen/include/Makefile +4 -3
@@ -111,9 +111,10 @@ 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 \ - -include stdint.h $(foreach j, $($(i)-prereq), -include $(j).h) \ - -S -o /dev/null $(i) \ + echo "#include "\"$(i)\" \ + | $(CC) -x c -std=c99 -Wall -Werror \ + -include stdint.h $(foreach j, $($(i)-prereq), -include $(j).h) \ + -S -o /dev/null - \ || exit $$?; echo $(i) >> [email protected];) mv [email protected] $@
Signature · 7 lines
2.11.0 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xen.org/xen-devel
Quoted 7 lines · Wei Liu
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.
Use a dummy file like the C++ header check to fix this.
Signed-off-by Wei Liu <[email protected]>
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel