diff mbox series

samples/seccomp: Avoid alias warning

Message ID 20210910223409.3225001-1-keescook@chromium.org (mailing list archive)
State Rejected
Headers show
Series samples/seccomp: Avoid alias warning | expand

Commit Message

Kees Cook Sept. 10, 2021, 10:34 p.m. UTC
Under GCC 4.9, fix the warning due to missing -fno-strict-aliasing:

samples/seccomp/user-trap.c:50:2: warning: dereferencing type-punned pointer will break strict-alias
ing rules [-Wstrict-aliasing]
samples/seccomp/user-trap.c:83:2: warning: dereferencing type-punned pointer will break strict-alias
ing rules [-Wstrict-aliasing]

Signed-off-by: Kees Cook <keescook@chromium.org>
---
 samples/seccomp/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/samples/seccomp/Makefile b/samples/seccomp/Makefile
index c85ae0ed8342..a3a3ef20a8fc 100644
--- a/samples/seccomp/Makefile
+++ b/samples/seccomp/Makefile
@@ -3,4 +3,4 @@  userprogs-always-y += bpf-fancy dropper bpf-direct user-trap
 
 bpf-fancy-objs := bpf-fancy.o bpf-helper.o
 
-userccflags += -I usr/include
+userccflags += -I usr/include -fno-strict-aliasing