[nfs-utils,3/3] support: nfs: rpc_socket: silence unused parameter warning on salen
diff mbox series

Message ID 20200113162918.77144-4-giulio.benetti@benettiengineering.com
State Accepted
Headers show
Series
  • bump rpcgen version and silence some warning
Related show

Commit Message

Giulio Benetti Jan. 13, 2020, 4:29 p.m. UTC
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@benettiengineering.com>
---
 support/nfs/rpc_socket.c | 2 ++
 1 file changed, 2 insertions(+)

Patch
diff mbox series

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;