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, and add the return's
where needed.
diff -Nru a/fs/nfsd/nfs4xdr.c b/fs/nfsd/nfs4xdr.c
--- a/fs/nfsd/nfs4xdr.c Tue Sep 9 14:42:16 2003
+++ b/fs/nfsd/nfs4xdr.c Tue Sep 9 14:42:16 2003
@@ -1116,13 +1116,13 @@
* 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] = {
@@ -1786,6 +1786,7 @@
}
ENCODE_SEQID_OP_TAIL(oc->oc_stateowner);
+ return nfserr;
}
static int
@@ -1801,6 +1802,7 @@
}
ENCODE_SEQID_OP_TAIL(od->od_stateowner);
+ return nfserr;
}
static int
-------------------------------------------------------
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
On Tuesday September 9, [email protected] wrote:
> 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, and add the return's
> where needed.
Looks good, thanks.
NeilBrown
-------------------------------------------------------
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