Commit 877f1dd5 authored by Rusty Russell's avatar Rusty Russell

nfs: Remove _U_, use ccan/compiler and UNUSED

Also, add Author and License lines to _info (ccanlint complained).
Now ccanlint can build it as a module.
parent 42f0d95f
CC=gcc
CFLAGS=-g -O0 -Wall -W -I../.. "-D_U_=__attribute__((unused))"
CFLAGS=-g -O0 -Wall -W -I../..
LIBS=
LIBNFS_OBJ = libnfs-raw-mount.o libnfs-raw-portmap.o libnfs-raw-nfs.o libnfs-raw-nfsacl.o mount.o nfs.o nfsacl.o portmap.o pdu.o init.o socket.o libnfs.o libnfs-sync.o
......
......@@ -9,6 +9,9 @@
* Note: various files are generated from the XDR descriptions in the rpc/
* directory using rpcgen.
*
* Author: Ronnie Sahlberg <ronniesahlberg@gmail.com>
* License: GPL
*
* Example:
* #include <ccan/nfs/nfs.h>
* #include <err.h>
......
......@@ -29,6 +29,7 @@
#include <fcntl.h>
#include <errno.h>
#include <poll.h>
#include <ccan/compiler/compiler.h>
#include "nfs.h"
#include "libnfs-raw.h"
#include "rpc/mount.h"
......@@ -75,7 +76,7 @@ static void wait_for_reply(struct nfs_context *nfs, struct sync_cb_data *cb_data
/*
* connect to the server and mount the export
*/
static void mount_cb(int status, struct nfs_context *nfs _U_, void *data, void *private_data)
static void mount_cb(int status, struct nfs_context *nfs UNUSED, void *data, void *private_data)
{
struct sync_cb_data *cb_data = private_data;
......@@ -108,7 +109,7 @@ int nfs_mount_sync(struct nfs_context *nfs, const char *server, const char *expo
/*
* stat()
*/
static void stat_cb(int status, struct nfs_context *nfs _U_, void *data, void *private_data)
static void stat_cb(int status, struct nfs_context *nfs UNUSED, void *data, void *private_data)
{
struct sync_cb_data *cb_data = private_data;
......@@ -146,7 +147,7 @@ int nfs_stat_sync(struct nfs_context *nfs, const char *path, struct stat *st)
/*
* open()
*/
static void open_cb(int status, struct nfs_context *nfs _U_, void *data, void *private_data)
static void open_cb(int status, struct nfs_context *nfs UNUSED, void *data, void *private_data)
{
struct sync_cb_data *cb_data = private_data;
struct nfsfh *fh, **nfsfh;
......@@ -187,7 +188,7 @@ int nfs_open_sync(struct nfs_context *nfs, const char *path, int mode, struct nf
/*
* pread()
*/
static void pread_cb(int status, struct nfs_context *nfs _U_, void *data, void *private_data)
static void pread_cb(int status, struct nfs_context *nfs UNUSED, void *data, void *private_data)
{
struct sync_cb_data *cb_data = private_data;
char *buffer;
......@@ -231,7 +232,7 @@ int nfs_read_sync(struct nfs_context *nfs, struct nfsfh *nfsfh, size_t count, ch
/*
* close()
*/
static void close_cb(int status, struct nfs_context *nfs _U_, void *data, void *private_data)
static void close_cb(int status, struct nfs_context *nfs UNUSED, void *data, void *private_data)
{
struct sync_cb_data *cb_data = private_data;
cb_data->is_finished = 1;
......@@ -286,7 +287,7 @@ int nfs_fstat_sync(struct nfs_context *nfs, struct nfsfh *nfsfh, struct stat *st
/*
* pwrite()
*/
static void pwrite_cb(int status, struct nfs_context *nfs _U_, void *data, void *private_data)
static void pwrite_cb(int status, struct nfs_context *nfs UNUSED, void *data, void *private_data)
{
struct sync_cb_data *cb_data = private_data;
cb_data->is_finished = 1;
......@@ -326,7 +327,7 @@ int nfs_write_sync(struct nfs_context *nfs, struct nfsfh *nfsfh, size_t count, c
/*
* fsync()
*/
static void fsync_cb(int status, struct nfs_context *nfs _U_, void *data, void *private_data)
static void fsync_cb(int status, struct nfs_context *nfs UNUSED, void *data, void *private_data)
{
struct sync_cb_data *cb_data = private_data;
cb_data->is_finished = 1;
......@@ -360,7 +361,7 @@ int nfs_fsync_sync(struct nfs_context *nfs, struct nfsfh *nfsfh)
/*
* ftruncate()
*/
static void ftruncate_cb(int status, struct nfs_context *nfs _U_, void *data, void *private_data)
static void ftruncate_cb(int status, struct nfs_context *nfs UNUSED, void *data, void *private_data)
{
struct sync_cb_data *cb_data = private_data;
cb_data->is_finished = 1;
......@@ -393,7 +394,7 @@ int nfs_ftruncate_sync(struct nfs_context *nfs, struct nfsfh *nfsfh, nfs_off_t l
/*
* truncate()
*/
static void truncate_cb(int status, struct nfs_context *nfs _U_, void *data, void *private_data)
static void truncate_cb(int status, struct nfs_context *nfs UNUSED, void *data, void *private_data)
{
struct sync_cb_data *cb_data = private_data;
cb_data->is_finished = 1;
......@@ -428,7 +429,7 @@ int nfs_truncate_sync(struct nfs_context *nfs, const char *path, nfs_off_t lengt
/*
* mkdir()
*/
static void mkdir_cb(int status, struct nfs_context *nfs _U_, void *data, void *private_data)
static void mkdir_cb(int status, struct nfs_context *nfs UNUSED, void *data, void *private_data)
{
struct sync_cb_data *cb_data = private_data;
cb_data->is_finished = 1;
......@@ -463,7 +464,7 @@ int nfs_mkdir_sync(struct nfs_context *nfs, const char *path)
/*
* rmdir()
*/
static void rmdir_cb(int status, struct nfs_context *nfs _U_, void *data, void *private_data)
static void rmdir_cb(int status, struct nfs_context *nfs UNUSED, void *data, void *private_data)
{
struct sync_cb_data *cb_data = private_data;
cb_data->is_finished = 1;
......@@ -496,7 +497,7 @@ int nfs_rmdir_sync(struct nfs_context *nfs, const char *path)
/*
* creat()
*/
static void creat_cb(int status, struct nfs_context *nfs _U_, void *data, void *private_data)
static void creat_cb(int status, struct nfs_context *nfs UNUSED, void *data, void *private_data)
{
struct sync_cb_data *cb_data = private_data;
struct nfsfh *fh, **nfsfh;
......@@ -537,7 +538,7 @@ int nfs_creat_sync(struct nfs_context *nfs, const char *path, int mode, struct n
/*
* unlink()
*/
static void unlink_cb(int status, struct nfs_context *nfs _U_, void *data, void *private_data)
static void unlink_cb(int status, struct nfs_context *nfs UNUSED, void *data, void *private_data)
{
struct sync_cb_data *cb_data = private_data;
......@@ -571,7 +572,7 @@ int nfs_unlink_sync(struct nfs_context *nfs, const char *path)
/*
* opendir()
*/
static void opendir_cb(int status, struct nfs_context *nfs _U_, void *data, void *private_data)
static void opendir_cb(int status, struct nfs_context *nfs UNUSED, void *data, void *private_data)
{
struct sync_cb_data *cb_data = private_data;
struct nfsdir *dir, **nfsdir;
......@@ -610,7 +611,7 @@ int nfs_opendir_sync(struct nfs_context *nfs, const char *path, struct nfsdir **
/*
* lseek()
*/
static void lseek_cb(int status, struct nfs_context *nfs _U_, void *data, void *private_data)
static void lseek_cb(int status, struct nfs_context *nfs UNUSED, void *data, void *private_data)
{
struct sync_cb_data *cb_data = private_data;
......@@ -649,7 +650,7 @@ int nfs_lseek_sync(struct nfs_context *nfs, struct nfsfh *nfsfh, nfs_off_t offse
/*
* statvfs()
*/
static void statvfs_cb(int status, struct nfs_context *nfs _U_, void *data, void *private_data)
static void statvfs_cb(int status, struct nfs_context *nfs UNUSED, void *data, void *private_data)
{
struct sync_cb_data *cb_data = private_data;
......@@ -688,7 +689,7 @@ int nfs_statvfs_sync(struct nfs_context *nfs, const char *path, struct statvfs *
/*
* readlink()
*/
static void readlink_cb(int status, struct nfs_context *nfs _U_, void *data, void *private_data)
static void readlink_cb(int status, struct nfs_context *nfs UNUSED, void *data, void *private_data)
{
struct sync_cb_data *cb_data = private_data;
......@@ -732,7 +733,7 @@ int nfs_readlink_sync(struct nfs_context *nfs, const char *path, char *buf, int
/*
* chmod()
*/
static void chmod_cb(int status, struct nfs_context *nfs _U_, void *data, void *private_data)
static void chmod_cb(int status, struct nfs_context *nfs UNUSED, void *data, void *private_data)
{
struct sync_cb_data *cb_data = private_data;
......@@ -767,7 +768,7 @@ int nfs_chmod_sync(struct nfs_context *nfs, const char *path, int mode)
/*
* fchmod()
*/
static void fchmod_cb(int status, struct nfs_context *nfs _U_, void *data, void *private_data)
static void fchmod_cb(int status, struct nfs_context *nfs UNUSED, void *data, void *private_data)
{
struct sync_cb_data *cb_data = private_data;
......@@ -802,7 +803,7 @@ int nfs_fchmod_sync(struct nfs_context *nfs, struct nfsfh *nfsfh, int mode)
/*
* chown()
*/
static void chown_cb(int status, struct nfs_context *nfs _U_, void *data, void *private_data)
static void chown_cb(int status, struct nfs_context *nfs UNUSED, void *data, void *private_data)
{
struct sync_cb_data *cb_data = private_data;
......@@ -834,7 +835,7 @@ int nfs_chown_sync(struct nfs_context *nfs, const char *path, int uid, int gid)
/*
* fchown()
*/
static void fchown_cb(int status, struct nfs_context *nfs _U_, void *data, void *private_data)
static void fchown_cb(int status, struct nfs_context *nfs UNUSED, void *data, void *private_data)
{
struct sync_cb_data *cb_data = private_data;
......@@ -868,7 +869,7 @@ int nfs_fchown_sync(struct nfs_context *nfs, struct nfsfh *nfsfh, int uid, int g
/*
* utimes()
*/
static void utimes_cb(int status, struct nfs_context *nfs _U_, void *data, void *private_data)
static void utimes_cb(int status, struct nfs_context *nfs UNUSED, void *data, void *private_data)
{
struct sync_cb_data *cb_data = private_data;
......@@ -902,7 +903,7 @@ int nfs_utimes_sync(struct nfs_context *nfs, const char *path, struct timeval *t
/*
* utime()
*/
static void utime_cb(int status, struct nfs_context *nfs _U_, void *data, void *private_data)
static void utime_cb(int status, struct nfs_context *nfs UNUSED, void *data, void *private_data)
{
struct sync_cb_data *cb_data = private_data;
......@@ -937,7 +938,7 @@ int nfs_utime_sync(struct nfs_context *nfs, const char *path, struct utimbuf *ti
/*
* access()
*/
static void access_cb(int status, struct nfs_context *nfs _U_, void *data, void *private_data)
static void access_cb(int status, struct nfs_context *nfs UNUSED, void *data, void *private_data)
{
struct sync_cb_data *cb_data = private_data;
......@@ -971,7 +972,7 @@ int nfs_access_sync(struct nfs_context *nfs, const char *path, int mode)
/*
* symlink()
*/
static void symlink_cb(int status, struct nfs_context *nfs _U_, void *data, void *private_data)
static void symlink_cb(int status, struct nfs_context *nfs UNUSED, void *data, void *private_data)
{
struct sync_cb_data *cb_data = private_data;
......@@ -1005,7 +1006,7 @@ int nfs_symlink_sync(struct nfs_context *nfs, const char *oldpath, const char *n
/*
* rename()
*/
static void rename_cb(int status, struct nfs_context *nfs _U_, void *data, void *private_data)
static void rename_cb(int status, struct nfs_context *nfs UNUSED, void *data, void *private_data)
{
struct sync_cb_data *cb_data = private_data;
......@@ -1039,7 +1040,7 @@ int nfs_rename_sync(struct nfs_context *nfs, const char *oldpath, const char *ne
/*
* link()
*/
static void link_cb(int status, struct nfs_context *nfs _U_, void *data, void *private_data)
static void link_cb(int status, struct nfs_context *nfs UNUSED, void *data, void *private_data)
{
struct sync_cb_data *cb_data = private_data;
......
......@@ -29,6 +29,7 @@
#include <utime.h>
#include <unistd.h>
#include <fcntl.h>
#include <ccan/compiler/compiler.h>
#include "nfs.h"
#include "libnfs-raw.h"
#include "rpc/mount.h"
......@@ -45,7 +46,7 @@ struct nfsdir {
struct nfsdirent *current;
};
void nfs_free_nfsdir(struct nfsdir *nfsdir)
static void nfs_free_nfsdir(struct nfsdir *nfsdir)
{
while (nfsdir->entries) {
struct nfsdirent *dirent = nfsdir->entries->next;
......@@ -155,7 +156,7 @@ void nfs_destroy_context(struct nfs_context *nfs)
free(nfs);
}
void free_nfs_cb_data(struct nfs_cb_data *data)
static void free_nfs_cb_data(struct nfs_cb_data *data)
{
if (data->saved_path != NULL) {
free(data->saved_path);
......@@ -179,7 +180,7 @@ void free_nfs_cb_data(struct nfs_cb_data *data)
static void nfs_mount_10_cb(struct rpc_context *rpc _U_, int status, void *command_data, void *private_data)
static void nfs_mount_10_cb(struct rpc_context *rpc UNUSED, int status, void *command_data, void *private_data)
{
struct nfs_cb_data *data = private_data;
struct nfs_context *nfs = data->nfs;
......@@ -473,7 +474,7 @@ int nfs_mount_async(struct nfs_context *nfs, const char *server, const char *exp
* Functions to first look up a path, component by component, and then finally call a specific function once
* the filehandle for the final component is found.
*/
static void nfs_lookup_path_1_cb(struct rpc_context *rpc _U_, int status, void *command_data, void *private_data)
static void nfs_lookup_path_1_cb(struct rpc_context *rpc UNUSED, int status, void *command_data, void *private_data)
{
struct nfs_cb_data *data = private_data;
struct nfs_context *nfs = data->nfs;
......@@ -596,7 +597,7 @@ static int nfs_lookuppath_async(struct nfs_context *nfs, const char *path, nfs_c
/*
* Async stat()
*/
static void nfs_stat_1_cb(struct rpc_context *rpc _U_, int status, void *command_data, void *private_data)
static void nfs_stat_1_cb(struct rpc_context *rpc UNUSED, int status, void *command_data, void *private_data)
{
GETATTR3res *res;
struct nfs_cb_data *data = private_data;
......@@ -668,7 +669,7 @@ int nfs_stat_async(struct nfs_context *nfs, const char *path, nfs_cb cb, void *p
/*
* Async open()
*/
static void nfs_open_cb(struct rpc_context *rpc _U_, int status, void *command_data, void *private_data)
static void nfs_open_cb(struct rpc_context *rpc UNUSED, int status, void *command_data, void *private_data)
{
ACCESS3res *res;
struct nfs_cb_data *data = private_data;
......@@ -781,7 +782,7 @@ int nfs_open_async(struct nfs_context *nfs, const char *path, int mode, nfs_cb c
/*
* Async pread()
*/
static void nfs_pread_cb(struct rpc_context *rpc _U_, int status, void *command_data, void *private_data)
static void nfs_pread_cb(struct rpc_context *rpc UNUSED, int status, void *command_data, void *private_data)
{
struct nfs_cb_data *data = private_data;
struct nfs_context *nfs = data->nfs;
......@@ -851,7 +852,7 @@ int nfs_read_async(struct nfs_context *nfs, struct nfsfh *nfsfh, size_t count, n
/*
* Async pwrite()
*/
static void nfs_pwrite_cb(struct rpc_context *rpc _U_, int status, void *command_data, void *private_data)
static void nfs_pwrite_cb(struct rpc_context *rpc UNUSED, int status, void *command_data, void *private_data)
{
struct nfs_cb_data *data = private_data;
struct nfs_context *nfs = data->nfs;
......@@ -972,7 +973,7 @@ int nfs_fstat_async(struct nfs_context *nfs, struct nfsfh *nfsfh, nfs_cb cb, voi
/*
* Async fsync()
*/
static void nfs_fsync_cb(struct rpc_context *rpc _U_, int status, void *command_data, void *private_data)
static void nfs_fsync_cb(struct rpc_context *rpc UNUSED, int status, void *command_data, void *private_data)
{
struct nfs_cb_data *data = private_data;
struct nfs_context *nfs = data->nfs;
......@@ -1032,7 +1033,7 @@ int nfs_fsync_async(struct nfs_context *nfs, struct nfsfh *nfsfh, nfs_cb cb, voi
/*
* Async ftruncate()
*/
static void nfs_ftruncate_cb(struct rpc_context *rpc _U_, int status, void *command_data, void *private_data)
static void nfs_ftruncate_cb(struct rpc_context *rpc UNUSED, int status, void *command_data, void *private_data)
{
struct nfs_cb_data *data = private_data;
struct nfs_context *nfs = data->nfs;
......@@ -1135,7 +1136,7 @@ int nfs_truncate_async(struct nfs_context *nfs, const char *path, nfs_off_t leng
/*
* Async mkdir()
*/
static void nfs_mkdir_cb(struct rpc_context *rpc _U_, int status, void *command_data, void *private_data)
static void nfs_mkdir_cb(struct rpc_context *rpc UNUSED, int status, void *command_data, void *private_data)
{
MKDIR3res *res;
struct nfs_cb_data *data = private_data;
......@@ -1216,7 +1217,7 @@ int nfs_mkdir_async(struct nfs_context *nfs, const char *path, nfs_cb cb, void *
/*
* Async rmdir()
*/
static void nfs_rmdir_cb(struct rpc_context *rpc _U_, int status, void *command_data, void *private_data)
static void nfs_rmdir_cb(struct rpc_context *rpc UNUSED, int status, void *command_data, void *private_data)
{
RMDIR3res *res;
struct nfs_cb_data *data = private_data;
......@@ -1296,7 +1297,7 @@ int nfs_rmdir_async(struct nfs_context *nfs, const char *path, nfs_cb cb, void *
/*
* Async creat()
*/
static void nfs_create_2_cb(struct rpc_context *rpc _U_, int status, void *command_data, void *private_data)
static void nfs_create_2_cb(struct rpc_context *rpc UNUSED, int status, void *command_data, void *private_data)
{
LOOKUP3res *res;
struct nfs_cb_data *data = private_data;
......@@ -1344,7 +1345,7 @@ static void nfs_create_2_cb(struct rpc_context *rpc _U_, int status, void *comma
static void nfs_creat_1_cb(struct rpc_context *rpc _U_, int status, void *command_data, void *private_data)
static void nfs_creat_1_cb(struct rpc_context *rpc UNUSED, int status, void *command_data, void *private_data)
{
CREATE3res *res;
struct nfs_cb_data *data = private_data;
......@@ -1428,7 +1429,7 @@ int nfs_creat_async(struct nfs_context *nfs, const char *path, int mode, nfs_cb
/*
* Async unlink()
*/
static void nfs_unlink_cb(struct rpc_context *rpc _U_, int status, void *command_data, void *private_data)
static void nfs_unlink_cb(struct rpc_context *rpc UNUSED, int status, void *command_data, void *private_data)
{
REMOVE3res *res;
struct nfs_cb_data *data = private_data;
......@@ -1509,7 +1510,7 @@ int nfs_unlink_async(struct nfs_context *nfs, const char *path, nfs_cb cb, void
/*
* Async opendir()
*/
static void nfs_opendir_cb(struct rpc_context *rpc _U_, int status, void *command_data, void *private_data)
static void nfs_opendir_cb(struct rpc_context *rpc UNUSED, int status, void *command_data, void *private_data)
{
READDIR3res *res;
struct nfs_cb_data *data = private_data;
......@@ -1626,7 +1627,7 @@ int nfs_opendir_async(struct nfs_context *nfs, const char *path, nfs_cb cb, void
}
struct nfsdirent *nfs_readdir(struct nfs_context *nfs _U_, struct nfsdir *nfsdir)
struct nfsdirent *nfs_readdir(struct nfs_context *nfs UNUSED, struct nfsdir *nfsdir)
{
struct nfsdirent *nfsdirent = nfsdir->current;
......@@ -1637,7 +1638,7 @@ struct nfsdirent *nfs_readdir(struct nfs_context *nfs _U_, struct nfsdir *nfsdir
}
void nfs_closedir(struct nfs_context *nfs _U_, struct nfsdir *nfsdir)
void nfs_closedir(struct nfs_context *nfs UNUSED, struct nfsdir *nfsdir)
{
nfs_free_nfsdir(nfsdir);
}
......@@ -1659,7 +1660,7 @@ struct lseek_cb_data {
void *private_data;
};
static void nfs_lseek_1_cb(struct rpc_context *rpc _U_, int status, void *command_data, void *private_data)
static void nfs_lseek_1_cb(struct rpc_context *rpc UNUSED, int status, void *command_data, void *private_data)
{
GETATTR3res *res;
struct lseek_cb_data *data = private_data;
......@@ -1730,7 +1731,7 @@ int nfs_lseek_async(struct nfs_context *nfs, struct nfsfh *nfsfh, nfs_off_t offs
/*
* Async statvfs()
*/
static void nfs_statvfs_1_cb(struct rpc_context *rpc _U_, int status, void *command_data, void *private_data)
static void nfs_statvfs_1_cb(struct rpc_context *rpc UNUSED, int status, void *command_data, void *private_data)
{
FSSTAT3res *res;
struct nfs_cb_data *data = private_data;
......@@ -1799,7 +1800,7 @@ int nfs_statvfs_async(struct nfs_context *nfs, const char *path, nfs_cb cb, void
/*
* Async readlink()
*/
static void nfs_readlink_1_cb(struct rpc_context *rpc _U_, int status, void *command_data, void *private_data)
static void nfs_readlink_1_cb(struct rpc_context *rpc UNUSED, int status, void *command_data, void *private_data)
{
READLINK3res *res;
struct nfs_cb_data *data = private_data;
......@@ -1856,7 +1857,7 @@ int nfs_readlink_async(struct nfs_context *nfs, const char *path, nfs_cb cb, voi
/*
* Async chmod()
*/
static void nfs_chmod_cb(struct rpc_context *rpc _U_, int status, void *command_data, void *private_data)
static void nfs_chmod_cb(struct rpc_context *rpc UNUSED, int status, void *command_data, void *private_data)
{
struct nfs_cb_data *data = private_data;
struct nfs_context *nfs = data->nfs;
......@@ -1955,7 +1956,7 @@ int nfs_fchmod_async(struct nfs_context *nfs, struct nfsfh *nfsfh, int mode, nfs
/*
* Async chown()
*/
static void nfs_chown_cb(struct rpc_context *rpc _U_, int status, void *command_data, void *private_data)
static void nfs_chown_cb(struct rpc_context *rpc UNUSED, int status, void *command_data, void *private_data)
{
struct nfs_cb_data *data = private_data;
struct nfs_context *nfs = data->nfs;
......@@ -2092,7 +2093,7 @@ int nfs_fchown_async(struct nfs_context *nfs, struct nfsfh *nfsfh, int uid, int
/*
* Async utimes()
*/
static void nfs_utimes_cb(struct rpc_context *rpc _U_, int status, void *command_data, void *private_data)
static void nfs_utimes_cb(struct rpc_context *rpc UNUSED, int status, void *command_data, void *private_data)
{
struct nfs_cb_data *data = private_data;
struct nfs_context *nfs = data->nfs;
......@@ -2208,7 +2209,7 @@ int nfs_utime_async(struct nfs_context *nfs, const char *path, struct utimbuf *t
/*
* Async access()
*/
static void nfs_access_cb(struct rpc_context *rpc _U_, int status, void *command_data, void *private_data)
static void nfs_access_cb(struct rpc_context *rpc UNUSED, int status, void *command_data, void *private_data)
{
ACCESS3res *res;
struct nfs_cb_data *data = private_data;
......@@ -2321,7 +2322,7 @@ static void free_nfs_symlink_data(void *mem)
free(data);
}
static void nfs_symlink_cb(struct rpc_context *rpc _U_, int status, void *command_data, void *private_data)
static void nfs_symlink_cb(struct rpc_context *rpc UNUSED, int status, void *command_data, void *private_data)
{
SYMLINK3res *res;
struct nfs_cb_data *data = private_data;
......@@ -2447,7 +2448,7 @@ static void free_nfs_rename_data(void *mem)
free(data);
}
static void nfs_rename_cb(struct rpc_context *rpc _U_, int status, void *command_data, void *private_data)
static void nfs_rename_cb(struct rpc_context *rpc UNUSED, int status, void *command_data, void *private_data)
{
RENAME3res *res;
struct nfs_cb_data *data = private_data;
......@@ -2603,7 +2604,7 @@ static void free_nfs_link_data(void *mem)
free(data);
}
static void nfs_link_cb(struct rpc_context *rpc _U_, int status, void *command_data, void *private_data)
static void nfs_link_cb(struct rpc_context *rpc UNUSED, int status, void *command_data, void *private_data)
{
LINK3res *res;
struct nfs_cb_data *data = private_data;
......
......@@ -19,6 +19,7 @@
#include <strings.h>
#include <rpc/xdr.h>
#include <rpc/rpc_msg.h>
#include <ccan/compiler/compiler.h>
#include "dlinklist.h"
#include "nfs.h"
#include "libnfs-raw.h"
......@@ -69,7 +70,7 @@ struct rpc_pdu *rpc_allocate_pdu(struct rpc_context *rpc, int program, int versi
return pdu;
}
void rpc_free_pdu(struct rpc_context *rpc _U_, struct rpc_pdu *pdu)
void rpc_free_pdu(struct rpc_context *rpc UNUSED, struct rpc_pdu *pdu)
{
if (pdu->outdata.data != NULL) {
free(pdu->outdata.data);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment