diff mbox series

[1/6] Annotate unused fields with UNUSED

Message ID 724274b0bf9340bc11f6741759ce1e43b82de7be.1566976047.git.ps@pks.im (mailing list archive)
State New, archived
Headers show
Series Fixes for various compiler warnings | expand

Commit Message

Patrick Steinhardt Aug. 28, 2019, 7:10 a.m. UTC
There are some parameters that may be potentially unused. Add the UNUSED
macro to avoid any warnings.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
---
 support/misc/xstat.c     | 3 ++-
 support/nfs/rpc_socket.c | 3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/support/misc/xstat.c b/support/misc/xstat.c
index 4c997eea..661e29e4 100644
--- a/support/misc/xstat.c
+++ b/support/misc/xstat.c
@@ -9,6 +9,7 @@ 
 #include <sys/sysmacros.h>
 #include <unistd.h>
 
+#include "nfslib.h"
 #include "xstat.h"
 
 #ifdef HAVE_FSTATAT
@@ -66,7 +67,7 @@  statx_stat_nosync(int fd, const char *pathname, struct stat *statbuf, int flags)
 #else
 
 static int
-statx_stat_nosync(int fd, const char *pathname, struct stat *statbuf, int flags)
+statx_stat_nosync(int UNUSED(fd), const char *UNUSED(pathname), struct stat *UNUSED(statbuf), int UNUSED(flags))
 {
 	errno = ENOSYS;
 	return -1;
diff --git a/support/nfs/rpc_socket.c b/support/nfs/rpc_socket.c
index bdf6d2f6..03048feb 100644
--- a/support/nfs/rpc_socket.c
+++ b/support/nfs/rpc_socket.c
@@ -41,6 +41,7 @@ 
 #include <rpc/pmap_prot.h>
 
 #include "sockaddr.h"
+#include "nfslib.h"
 #include "nfsrpc.h"
 
 #ifdef HAVE_LIBTIRPC
@@ -519,7 +520,7 @@  CLIENT *nfs_get_priv_rpcclient(const struct sockaddr *sap,
  * Returns program number of first name to be successfully looked
  * up, or the default program number if all lookups fail.
  */
-rpcprog_t nfs_getrpcbyname(const rpcprog_t program, const char *table[])
+rpcprog_t nfs_getrpcbyname(const rpcprog_t program, const char *UNUSED(table[]))
 {
 #ifdef HAVE_GETRPCBYNAME
 	struct rpcent *entry;