trinity.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Vinson Lee <vlee@freedesktop.org>
To: trinity@vger.kernel.org
Cc: Vinson Lee <vlee@twitter.com>
Subject: [PATCH] syscall/prctl.c: Fix unused variable build error with USE_SECCOMP=0.
Date: Wed,  4 Dec 2013 10:33:00 -0800	[thread overview]
Message-ID: <1386181980-3294-1-git-send-email-vlee@freedesktop.org> (raw)

From: Vinson Lee <vlee@twitter.com>

This patch fixes this build error on CentOS 6.

  CC	syscalls/prctl.o
cc1: warnings being treated as errors
syscalls/prctl.c: In function ‘sanitise_prctl’:
syscalls/prctl.c:36: error: unused variable ‘saddr’

Signed-off-by: Vinson Lee <vlee@twitter.com>
---
 syscalls/prctl.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/syscalls/prctl.c b/syscalls/prctl.c
index acca027..bde76aa 100644
--- a/syscalls/prctl.c
+++ b/syscalls/prctl.c
@@ -33,7 +33,9 @@ static int prctl_opts[NR_PRCTL_OPTS] = {
 void sanitise_prctl(int childno)
 {
 	int option = prctl_opts[rand() % NR_PRCTL_OPTS];
+#ifdef USE_SECCOMP
 	struct sockaddr *saddr = NULL;
+#endif
 
 // For now, just do SECCOMP, the other options need some attention.
 option = PR_SET_SECCOMP;
-- 
1.7.1

             reply	other threads:[~2013-12-04 18:33 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-04 18:33 Vinson Lee [this message]
2013-12-04 18:44 ` [PATCH] syscall/prctl.c: Fix unused variable build error with USE_SECCOMP=0 Dave Jones
2013-12-04 18:49   ` Vinson Lee

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:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

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

  git send-email \
    --in-reply-to=1386181980-3294-1-git-send-email-vlee@freedesktop.org \
    --to=vlee@freedesktop.org \
    --cc=trinity@vger.kernel.org \
    --cc=vlee@twitter.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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 read-only IMAP folder(s) and NNTP newsgroup(s).