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] Fix unused variable build errors.
Date: Wed, 13 Nov 2013 11:17:27 -0800	[thread overview]
Message-ID: <1384370247-21352-1-git-send-email-vlee@freedesktop.org> (raw)

From: Vinson Lee <vlee@twitter.com>

This patch fixes these build errors on CentOS 6.

  CC	net/caif_setsockopt.o
cc1: warnings being treated as errors
net/caif_setsockopt.c: In function ‘caif_setsockopt’:
net/caif_setsockopt.c:20: error: unused variable ‘val’

  CC	net/rds_setsockopt.o
cc1: warnings being treated as errors
net/rds_setsockopt.c: In function ‘rds_setsockopt’:
net/rds_setsockopt.c:23: error: unused variable ‘val’

Signed-off-by: Vinson Lee <vlee@twitter.com>
---
 net/caif_setsockopt.c |    2 ++
 net/rds_setsockopt.c  |    2 ++
 2 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/net/caif_setsockopt.c b/net/caif_setsockopt.c
index fcc42c0..c829521 100644
--- a/net/caif_setsockopt.c
+++ b/net/caif_setsockopt.c
@@ -17,7 +17,9 @@ static const unsigned int caif_opts[] = { CAIFSO_LINK_SELECT, CAIFSO_REQ_PARAM }
 
 void caif_setsockopt(struct sockopt *so)
 {
+#ifdef USE_CAIF
 	unsigned char val;
+#endif
 
 	so->level = SOL_CAIF;
 
diff --git a/net/rds_setsockopt.c b/net/rds_setsockopt.c
index 25b6c8b..6ad6e2a 100644
--- a/net/rds_setsockopt.c
+++ b/net/rds_setsockopt.c
@@ -20,7 +20,9 @@ static const unsigned int rds_opts[] = {
 
 void rds_setsockopt(struct sockopt *so)
 {
+#ifdef USE_RDS
 	unsigned char val;
+#endif
 
 	so->level = SOL_RDS;
 #ifdef USE_RDS
-- 
1.7.1

                 reply	other threads:[~2013-11-13 19:17 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:
  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=1384370247-21352-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 NNTP newsgroup(s).