[2.6 patch] fix nfs4xdr.c compile warning

From: Adrian Bunk
Date: Tue Sep 09 2003 - 06:39:35 EST


On Mon, Sep 08, 2003 at 01:32:05PM -0700, Linus Torvalds wrote:
>...
> Summary of changes from v2.6.0-test4 to v2.6.0-test5
> ============================================
>...
> Neil Brown:
>...
> o fix in NFSv4 server for bad sequence id errors
>...

This produces the following compile warning:

<-- snip -->

...
CC fs/nfsd/nfs4xdr.o
fs/nfsd/nfs4xdr.c: In function `nfsd4_encode_open':
fs/nfsd/nfs4xdr.c:1773: warning: `return' with a value, in function returning void
...

<-- snip -->


The following patch tries to fix it:

--- linux-2.6.0-test5-mm1/fs/nfsd/nfs4xdr.c.old 2003-09-09 13:34:36.000000000 +0200
+++ linux-2.6.0-test5-mm1/fs/nfsd/nfs4xdr.c 2003-09-09 13:36:03.000000000 +0200
@@ -1709,7 +1709,7 @@
}


-static void
+static int
nfsd4_encode_open(struct nfsd4_compoundres *resp, int nfserr, struct nfsd4_open *open)
{
ENCODE_HEAD;



BTW:
Shouldn't the return values of nfsd4_encode_open{,_confirm,_downgrade}
be checked in the switch in nfsd4_encode_operation?

cu
Adrian

--

"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon Seed

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/