Skip to contentSkip to conversation

samples/seccomp: Avoid alias warning

PATCH New Kees Cook 1 participant 1 message Sep 10, 2021

lore
Share & tools
lore

Kees Cook

author
#0 lore raw

PATCH 1/1 samples/seccomp: Avoid alias warning

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]

---
 samples/seccomp/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
samples/seccomp/Makefile +1 -1
index c85ae0ed8342..a3a3ef20a8fc 100644
@@ -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
Signature · 1 line
2.30.2