samples/bpf: silence compiler warnings
authorAlexei Starovoitov <ast@fb.com>
Fri, 2 Dec 2016 02:31:12 +0000 (18:31 -0800)
committerDavid S. Miller <davem@davemloft.net>
Sat, 3 Dec 2016 21:01:14 +0000 (16:01 -0500)
silence some of the clang compiler warnings like:
include/linux/fs.h:2693:9: warning: comparison of unsigned enum expression < 0 is always false
arch/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.

Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
samples/bpf/Makefile

index bfc2cb88a1f7a10eb5311a672f13d74b2e56a73c..13c3e1869890366a87280aed3bc33d337b5d1f28 100644 (file)
@@ -168,4 +168,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 $@