[PATCH 1/6] Annotate unused fields with UNUSED

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

 



There are some parameters that may be potentially unused. Add the UNUSED
macro to avoid any warnings.

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

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;
-- 
2.23.0




[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