From ca04cb992b687acc0dccd17074dc80239dc52e42 Mon Sep 17 00:00:00 2001 From: Neil Brown Date: Mon, 22 Sep 2003 05:22:28 -0700 Subject: [PATCH] [PATCH] knfsd: NFS4XDR get rid of warning 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. --- fs/nfsd/nfs4xdr.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/fs/nfsd/nfs4xdr.c b/fs/nfsd/nfs4xdr.c index dd76f066aac06..371f515f91436 100644 --- a/fs/nfsd/nfs4xdr.c +++ b/fs/nfsd/nfs4xdr.c @@ -1116,13 +1116,13 @@ nfsd4_decode_compound(struct nfsd4_compoundargs *argp) * 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_compoundres *resp, int nfserr, struct nfsd4_open ENCODE_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_compoundres *resp, int nfserr, struct nfs ENCODE_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; -- 2.53.0