get rid of some compiler warnings

libnfs-4.0.0-vitalif
Ronnie Sahlberg 2011-06-01 00:12:55 +10:00
parent 17ef62fad7
commit 7d0397cf0f
3 changed files with 12 additions and 14 deletions

View File

@ -19,7 +19,7 @@
*/
#define SERVER "10.1.1.27"
#define EXPORT "/VIRTUAL"
#define EXPORT "/shared"
#define NFSFILE "/BOOKS/Classics/Dracula.djvu"
#define NFSDIR "/BOOKS/Classics/"
@ -187,7 +187,7 @@ void nfs_mount_cb(int status, struct nfs_context *nfs, void *data, void *private
int main(int argc, char *argv[])
int main(int argc _U_, char *argv[] _U_)
{
struct nfs_context *nfs;
struct pollfd pfd;

View File

@ -38,7 +38,7 @@ struct client {
struct nfs_fh3 rootfh;
};
void nfs_fsinfo_cb(struct rpc_context *rpc, int status, void *data, void *private_data)
void nfs_fsinfo_cb(struct rpc_context *rpc _U_, int status, void *data, void *private_data)
{
struct client *client = private_data;
FSINFO3res *res = data;
@ -59,7 +59,7 @@ void nfs_fsinfo_cb(struct rpc_context *rpc, int status, void *data, void *privat
}
void nfs_connect_cb(struct rpc_context *rpc, int status, void *data, void *private_data)
void nfs_connect_cb(struct rpc_context *rpc, int status, void *data _U_, void *private_data)
{
struct client *client = private_data;
@ -130,7 +130,7 @@ void mount_null_cb(struct rpc_context *rpc, int status, void *data, void *privat
}
}
void mount_connect_cb(struct rpc_context *rpc, int status, void *data, void *private_data)
void mount_connect_cb(struct rpc_context *rpc, int status, void *data _U_, void *private_data)
{
struct client *client = private_data;
@ -151,7 +151,6 @@ void mount_connect_cb(struct rpc_context *rpc, int status, void *data, void *pri
void pmap_getport_cb(struct rpc_context *rpc, int status, void *data, void *private_data)
{
struct client *client = private_data;
uint32_t port;
if (status == RPC_STATUS_ERROR) {
printf("portmapper getport call failed with \"%s\"\n", (char *)data);
@ -165,7 +164,7 @@ void pmap_getport_cb(struct rpc_context *rpc, int status, void *data, void *priv
client->mount_port = *(uint32_t *)data;
printf("GETPORT returned Port:%d\n", client->mount_port);
if (client->mount_port == 0) {
printf("RPC.MOUNTD is not available on server : %s\n", client->server, client->mount_port);
printf("RPC.MOUNTD is not available on server : %s:%d\n", client->server, client->mount_port);
exit(10);
}
@ -204,7 +203,7 @@ void pmap_null_cb(struct rpc_context *rpc, int status, void *data, void *private
}
}
void pmap_connect_cb(struct rpc_context *rpc, int status, void *data, void *private_data)
void pmap_connect_cb(struct rpc_context *rpc, int status, void *data _U_, void *private_data)
{
struct client *client = private_data;
@ -222,11 +221,10 @@ void pmap_connect_cb(struct rpc_context *rpc, int status, void *data, void *priv
}
int main(int argc, char *argv[])
int main(int argc _U_, char *argv[] _U_)
{
struct rpc_context *rpc;
struct pollfd pfd;
int ret;
struct client client;
rpc = rpc_init_context();

View File

@ -44,7 +44,7 @@ struct client {
};
int main(int argc, char *argv[])
int main(int argc _U_, char *argv[] _U_)
{
struct nfs_context *nfs;
int i, ret;
@ -137,7 +137,7 @@ int main(int argc, char *argv[])
ret = nfs_close_sync(nfs, nfsfh);
if (ret < 0) {
printf("Failed to close(%s)\n", NFSFILE, nfs_get_error(nfs));
printf("Failed to close(%s): %s\n", NFSFILE, nfs_get_error(nfs));
exit(10);
}
@ -169,14 +169,14 @@ int main(int argc, char *argv[])
}
ret = nfs_close_sync(nfs, nfsfh);
if (ret < 0) {
printf("Failed to close(%s)\n", NFSFILEW, nfs_get_error(nfs));
printf("Failed to close(%s) %s\n", NFSFILEW, nfs_get_error(nfs));
exit(10);
}
ret = nfs_statvfs_sync(nfs, NFSDIR, &svfs);
if (ret < 0) {
printf("Failed to statvfs(%s)\n", NFSDIR, nfs_get_error(nfs));
printf("Failed to statvfs(%s) %s\n", NFSDIR, nfs_get_error(nfs));
exit(10);
}
printf("files %d/%d/%d\n", (int)svfs.f_files, (int)svfs.f_ffree, (int)svfs.f_favail);