samples/bpf: silence compiler warnings
Subsystems (3)
PATCH 1/1 samples/bpf: silence compiler warnings
silence some of the clang compiler warnings like:include/linux/fs.h:2693:9: warning: comparison of unsigned enum expression < 0 is always falsearch/x86/include/asm/processor.h:491:30: warning: taking address of packed member 'sp0' of class or structure 'x86_hw_tss' may result in an unaligned pointer value include/linux/cgroup-defs.h:326:16: warning: field 'cgrp' with variable sized type 'struct cgroup' not at the end of a struct or class is a GNU extension since they add too much noise to samples/bpf/ build.
--- samples/bpf/Makefile | 2 ++ 1 file changed, 2 insertions(+)
samples/bpf/Makefile +2 -0
@@ -158,4 +158,6 @@ $(obj)/%.o: $(src)/%.c $(CLANG) $(NOSTDINC_FLAGS) $(LINUXINCLUDE) $(EXTRA_CFLAGS) \ -D__KERNEL__ -D__ASM_SYSREG_H -Wno-unused-value -Wno-pointer-sign \ -Wno-compare-distinct-pointer-types \ + -Wno-gnu-variable-sized-type-not-at-end \ + -Wno-address-of-packed-member -Wno-tautological-compare \ -O2 -emit-llvm -c $< -o -| $(LLC) -march=bpf -filetype=obj -o $@
Signature · 1 line
2.8.0
From: Alexei Starovoitov <[email protected]>
Date: Thu, 1 Dec 2016 18:31:12 -0800
Quoted 7 lines
silence some of the clang compiler warnings like:
include/linux/fs.h:2693:9: warning: comparison of unsigned enum expression < 0 is always falsearch/x86/include/asm/processor.h:491:30: warning: taking address of packed member 'sp0' of class or structure 'x86_hw_tss' may result in an unaligned pointer valueinclude/linux/cgroup-defs.h:326:16: warning: field 'cgrp' with variable sized type 'struct cgroup' not at the end of a struct or class is a GNU extension since they add too much noise tosamples/bpf/build.Signed-off-by Alexei Starovoitov <[email protected]>
Applied.