Skip to content

Commit

Permalink
WIN32: VS does not like the spurious int i; that rpcgen sometimes gen…
Browse files Browse the repository at this point in the history
…erate

Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
  • Loading branch information
sahlberg committed Dec 27, 2016
1 parent 85853ae commit d93cc94
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion nfs4/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ compile_rpc:
cat nfs4.x | head -29 >libnfs-raw-nfs4.h
rpcgen -h nfs4.x | sed -e "s/#include <rpc\/rpc.h>/#include <nfsc\/libnfs-zdr.h>/" -e "s/xdr/zdr/g" -e "s/XDR/ZDR/g" -e "s/#define _NFS_H_RPCGEN/#define _NFS_H_RPCGEN\n#include <nfsc\/libnfs-zdr.h>/g" -e "s/#define NFS3_COOKIEVERFSIZE 8/#define NFS3_COOKIEVERFSIZE 8\n\n/g" -e "s/ CLIENT / void /g" -e "s/SVCXPRT /void /g" -e "s/bool_t/uint32_t/g" >> libnfs-raw-nfs4.h
cat nfs4.x | head -29 >libnfs-raw-nfs4.c
rpcgen -c nfs4.x | sed -e "s/#include \".*nfs4.h\"/#include \"libnfs-xdr.h\"\n#include \"libnfs-raw-nfs4.h\"/" -e "s/xdr/zdr/g" -e "s/XDR/ZDR/g" -e "s/register int32_t \*buf;/register int32_t *buf;\n buf = NULL;/" -e "s/bool_t/uint32_t/g" >> libnfs-raw-nfs4.c
rpcgen -c nfs4.x | sed -e "s/#include \".*nfs4.h\"/#include \"libnfs-xdr.h\"\n#include \"libnfs-raw-nfs4.h\"/" -e "s/xdr/zdr/g" -e "s/XDR/ZDR/g" -e "s/register int32_t \*buf;/register int32_t *buf;\n buf = NULL;/" -e "s/bool_t/uint32_t/g" -e "s/int i;//" >> libnfs-raw-nfs4.c
2 changes: 1 addition & 1 deletion nfs4/libnfs-raw-nfs4.c
Original file line number Diff line number Diff line change
Expand Up @@ -1125,7 +1125,7 @@ zdr_stateid4 (ZDR *zdrs, stateid4 *objp)
register int32_t *buf;
buf = NULL;

int i;

if (!zdr_uint32_t (zdrs, &objp->seqid))
return FALSE;
if (!zdr_opaque (zdrs, objp->other, 12))
Expand Down

0 comments on commit d93cc94

Please sign in to comment.