LKML Archive on
help / color / mirror / Atom feed
From: Kees Cook <>
Cc: Kees Cook <>,
Subject: [PATCH] samples/seccomp: Avoid alias warning
Date: Fri, 10 Sep 2021 15:34:09 -0700	[thread overview]
Message-ID: <> (raw)

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 <>
 samples/seccomp/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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

                 reply	other threads:[~2021-09-10 22:34 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \
    --subject='Re: [PATCH] samples/seccomp: Avoid alias warning' \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).