NFS: Fix up compiler warnings in super.c
Subsystems (2)
PATCH 4/10 NFS: Fix up compiler warnings in super.c
---
fs/nfs/super.c | 10 ++++++---- 1 files changed, 6 insertions(+), 4 deletions(-)
fs/nfs/super.c +6 -4
@@ -263,11 +263,11 @@ static const char *nfs_pseudoflavour_to_name(rpc_authflavor_t flavour) { RPC_AUTH_GSS_SPKM, "spkm" }, { RPC_AUTH_GSS_SPKMI, "spkmi" }, { RPC_AUTH_GSS_SPKMP, "spkmp" }, - { -1, "unknown" } + { UINT_MAX, "unknown" } };int i; -for (i=0 ; sec_flavours[i].flavour !=-1 ; i++) { +for (i =0 ; sec_flavours[i].flavour !=UINT_MAX ; i++) {if (sec_flavours[i].flavour == flavour)break ; }
@@ -355,7 +355,9 @@ static int nfs_show_stats(struct seq_file *m, struct vfsmount *mnt)int i, cpu;struct nfs_server *nfss =NFS_SB (mnt->mnt_sb);struct rpc_auth *auth = nfss->client->cl_auth; -struct nfs_iostats totals = { }; +struct nfs_iostats totals; + +memset (&totals,0 ,sizeof (struct nfs_iostats ));seq_printf (m,"statvers=%s" ,NFS_IOSTAT_VERS );
@@ -772,7 +774,7 @@ static void nfs4_fill_super(struct super_block *sb)nfs_initialise_sb (sb); } -static void *nfs_copy_user_string (char *dst,struct nfs_string *src,int maxlen) +static void *nfs_copy_user_string (char *dst,struct nfs_string *src,size_t maxlen) {void *p =NULL ;
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs
Quoted 25 lines · Chuck Lever
Signed-off-by Chuck Lever <[email protected]>---
fs/nfs/super.c | 10 ++++++---- 1 files changed, 6 insertions(+), 4 deletions(-)fs/nfs/super.c +2
-2@@ -263,11 +263,11 @@ static const char *nfs_pseudoflavour_to_name(rpc_authflavor_t flavour) { RPC_AUTH_GSS_SPKM, "spkm" }, { RPC_AUTH_GSS_SPKMI, "spkmi" }, { RPC_AUTH_GSS_SPKMP, "spkmp" }, - { -1, "unknown" } + { UINT_MAX, "unknown" } };int i; -for (i=0 ; sec_flavours[i].flavour !=-1 ; i++) { +for (i =0 ; sec_flavours[i].flavour !=UINT_MAX ; i++) {if (sec_flavours[i].flavour == flavour)break ; }
fs/nfs/super.c static int nfs_show_stats(struct seq_file *m, struct vfsmount *mnt) · line 360
Quoted 7 lines
fs/nfs/super.c +3
-1@@ -355,7 +355,9 @@ static int nfs_show_stats(struct seq_file *m, struct vfsmount *mnt)int i, cpu;struct nfs_server *nfss =NFS_SB (mnt->mnt_sb);struct rpc_auth *auth = nfss->client->cl_auth; -struct nfs_iostats totals = { }; +struct nfs_iostats totals; + +memset (&totals,0 ,sizeof (struct nfs_iostats ));
Urgh. What is the purpose of this?
fs/nfs/super.c static void nfs4_fill_super(struct super_block *sb) · line 780
Quoted 12 lines
fs/nfs/super.c +1
-1seq_printf (m,"statvers=%s" ,NFS_IOSTAT_VERS );@@ -772,7 +774,7 @@ static void nfs4_fill_super(struct super_block *sb)nfs_initialise_sb (sb); } -static void *nfs_copy_user_string (char *dst,struct nfs_string *src,int maxlen) +static void *nfs_copy_user_string (char *dst,struct nfs_string *src,size_t maxlen) {void *p =NULL ;
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs