[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Vinson Lee <vlee@xxxxxxxxxxx>

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@xxxxxxxxxxx>
---
 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

--
To unsubscribe from this list: send the line "unsubscribe trinity" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux SCSI]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux