From: Ronnie Sahlberg Date: Wed, 4 Jul 2012 21:21:48 +0000 (+1000) Subject: squelch compiler warnings in socket.c about integer sizes X-Git-Tag: upstream/1.9.6^2~242^2~19 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=d14e28387f825d7acc33d655db7a22506b064d83;p=deb_libnfs.git squelch compiler warnings in socket.c about integer sizes --- diff --git a/include/libnfs-private.h b/include/libnfs-private.h index faa261c..c12d959 100644 --- a/include/libnfs-private.h +++ b/include/libnfs-private.h @@ -44,8 +44,8 @@ struct rpc_context { struct sockaddr_storage udp_src; struct rpc_pdu *waitpdu; - int inpos; - int insize; + uint32_t inpos; + uint32_t insize; char *inbuf; /* special fields for UDP, which can sometimes be BROADCASTed */ @@ -67,7 +67,7 @@ struct rpc_pdu { unsigned long xid; ZDR zdr; - int written; + uint32_t written; struct rpc_data outdata; rpc_cb cb; @@ -76,7 +76,7 @@ struct rpc_pdu { /* function to decode the zdr reply data and buffer to decode into */ zdrproc_t zdr_decode_fn; caddr_t zdr_decode_buf; - int zdr_decode_bufsize; + uint32_t zdr_decode_bufsize; }; struct rpc_pdu *rpc_allocate_pdu(struct rpc_context *rpc, int program, int version, int procedure, rpc_cb cb, void *private_data, zdrproc_t zdr_decode_fn, int zdr_bufsize); diff --git a/lib/socket.c b/lib/socket.c index 360e511..71bb817 100644 --- a/lib/socket.c +++ b/lib/socket.c @@ -89,7 +89,7 @@ int rpc_which_events(struct rpc_context *rpc) static int rpc_write_to_socket(struct rpc_context *rpc) { - int64_t count; + int32_t count; if (rpc == NULL) { return -1; @@ -133,7 +133,7 @@ static int rpc_read_from_socket(struct rpc_context *rpc) int available; int size; int pdu_size; - int64_t count; + int32_t count; #if defined(WIN32) if (ioctlsocket(rpc->fd, FIONREAD, &available) != 0) {