[nfs-utils PATCH 3/3] support: nfs: rpc_socket: silence unused parameter warning on salen

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

 



If HAVE_LIBTIRPC is not defined salen parameter is unused and not taken
into account, so compiler emits warning. Add a (void) salen; in that
case.

Signed-off-by: Giulio Benetti <giulio.benetti@xxxxxxxxxxxxxxxxxxxxxx>
---
 support/nfs/rpc_socket.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/support/nfs/rpc_socket.c b/support/nfs/rpc_socket.c
index bdf6d2f6..5fabf5a1 100644
--- a/support/nfs/rpc_socket.c
+++ b/support/nfs/rpc_socket.c
@@ -77,6 +77,8 @@ static CLIENT *nfs_get_localclient(const struct sockaddr *sap,
 		.len		= (size_t)salen,
 		.buf		= &address,
 	};
+#else
+	(void) salen;
 #endif	/* HAVE_LIBTIRPC */
 	CLIENT *client;
 	int sock;
-- 
2.20.1




[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux