* [PATCH] Fix unused variable build errors.
@ 2013-11-13 19:17 Vinson Lee
0 siblings, 0 replies; only message in thread
From: Vinson Lee @ 2013-11-13 19:17 UTC (permalink / raw)
To: trinity; +Cc: Vinson Lee
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
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2013-11-13 19:17 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-13 19:17 [PATCH] Fix unused variable build errors Vinson Lee
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).