kNFSd - 2 of 7 - Subject: [PATCH] NFS4XDR get rid of warning
Subsystems (2)
PATCH 1/1 kNFSd - 2 of 7 - Subject: [PATCH] NFS4XDR get rid of warning
### Comments for ChangeSet
with small mods by NeilBrown
On 2.6.0-test5 there is a warning because of calling return with an argument on a void function. The root cause is putting a return statement in a macro (evil side effect).
Change ENCODE_SEQID_OP_TAIL to be a more proper macro, change all calling functions to return void.
----------- Diffstat output ------------
./fs/nfsd/nfs4xdr.c | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-)
fs/nfsd/nfs4xdr.c renamed from fs/nfsd/nfs4xdr.c~current~ +4 -4
@@ -1116,13 +1116,13 @@ nfsd4_decode_compound(struct nfsd4_compo* where seqids are incremented */ -#define ENCODE_SEQID_OP_TAIL (stateowner) \ +#define ENCODE_SEQID_OP_TAIL (stateowner) do { \ BUG_ON(!stateowner); \ if (seqid_mutating_err(nfserr) && stateowner) { \ if (stateowner->so_confirmed) \ stateowner->so_seqid++; \ } \ - return nfserr; +} while(0)static u32 nfs4_ftypes[16 ] = {
@@ -1773,7 +1773,7 @@ nfsd4_encode_open(struct nfsd4_compoundrENCODE_SEQID_OP_TAIL (open->op_stateowner); } -static int +static void nfsd4_encode_open_confirm (struct nfsd4_compoundres *resp,int nfserr,struct nfsd4_open_confirm *oc) {ENCODE_HEAD ;
@@ -1788,7 +1788,7 @@ nfsd4_encode_open_confirm(struct nfsd4_cENCODE_SEQID_OP_TAIL (oc->oc_stateowner); } -static int +static void nfsd4_encode_open_downgrade (struct nfsd4_compoundres *resp,int nfserr,struct nfsd4_open_downgrade *od) {ENCODE_HEAD ;
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs