lkml.org 
[lkml]   [2003]   [Sep]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] fix compile warning in fs/nfsd/nfs4xdr.c, 2.6.0-t5-cvs
When compiling fs/nfsd/nfs4xdr.c, I get a warning:

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

This patch fixes it. I'm not 100% sure about it, but it seems
correct, and the return value is ignored anyway...

diff --exclude-from /home/muli/p/dontdiff -Naur ../linux-2.5/fs/nfsd/nfs4xdr.c 2.6.0-t5-Werror/fs/nfsd/nfs4xdr.c
--- ../linux-2.5/fs/nfsd/nfs4xdr.c Tue Sep 2 12:51:06 2003
+++ 2.6.0-t5-Werror/fs/nfsd/nfs4xdr.c Sun Sep 21 10:18:19 2003
@@ -1709,13 +1709,13 @@
}


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

if (nfserr)
- return;
+ return nfserr;

RESERVE_SPACE(36 + sizeof(stateid_t));
WRITE32(open->op_stateid.si_generation);
--
Muli Ben-Yehuda
http://www.mulix.org

[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2005-03-22 13:48    [W:0.050 / U:3.288 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site