* clnt_raw, clnt_tcp.c, clnt_udp.c: Use a union structure to
authorEzra Peisach <epeisach@mit.edu>
Fri, 7 Dec 2001 19:20:17 +0000 (19:20 +0000)
committerEzra Peisach <epeisach@mit.edu>
Fri, 7 Dec 2001 19:20:17 +0000 (19:20 +0000)
ensure argument alignment.

* pmap_clnt.c, pmap_clnt.h (pmap_set): Change port argument to int
to avoid width warnings.

* rpc_callmsg.c (xdr_callmsg): Cast argument to XDR_INLINE to
avoid signed vs. unsigned warning.

* svc.c: Cast assignment to avoid signed warning.

* xdr.c (xdr_u_short, xdr_u_long): cast pointers to long * in
invocation of XDR_PUTLONG.

* xdr_alloc.c (xdralloc_putbytes): Cast argument to DynInsert to
avoid signed/unsigned warning.

* auth_gssapi.c, svc_auth_gssapi, xdr_rec.c: Cast arguments to
avoid alignment warnings.

* svc_tcp.c, xdr_stdio.c: Cast argument to fread/fwrite/read/write.

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@14054 dc483132-0cff-0310-8789-dd5450dbe970

16 files changed:
src/lib/rpc/ChangeLog
src/lib/rpc/auth_gssapi.c
src/lib/rpc/clnt_raw.c
src/lib/rpc/clnt_tcp.c
src/lib/rpc/clnt_udp.c
src/lib/rpc/pmap_clnt.c
src/lib/rpc/pmap_clnt.h
src/lib/rpc/pmap_rmt.c
src/lib/rpc/rpc_callmsg.c
src/lib/rpc/svc.c
src/lib/rpc/svc_auth_gssapi.c
src/lib/rpc/svc_tcp.c
src/lib/rpc/xdr.c
src/lib/rpc/xdr_alloc.c
src/lib/rpc/xdr_rec.c
src/lib/rpc/xdr_stdio.c

index ca3f0a49b4bde996cb264d48f3472b50d12e0fc5..eed252fc8d5348b9cb8be255807e04392fa0056c 100644 (file)
@@ -1,3 +1,27 @@
+2001-12-07  Ezra Peisach  <epeisach@mit.edu>
+
+       * clnt_raw, clnt_tcp.c, clnt_udp.c: Use a union structure to
+       ensure argument alignment.
+
+       * pmap_clnt.c, pmap_clnt.h (pmap_set): Change port argument to int
+       to avoid width warnings.
+
+       * rpc_callmsg.c (xdr_callmsg): Cast argument to XDR_INLINE to
+       avoid signed vs. unsigned warning.
+
+       * svc.c: Cast assignment to avoid signed warning.
+
+       * xdr.c (xdr_u_short, xdr_u_long): cast pointers to long * in
+       invocation of XDR_PUTLONG.
+
+       * xdr_alloc.c (xdralloc_putbytes): Cast argument to DynInsert to
+       avoid signed/unsigned warning.
+
+       * auth_gssapi.c, svc_auth_gssapi, xdr_rec.c: Cast arguments to
+       avoid alignment warnings.
+
+       * svc_tcp.c, xdr_stdio.c: Cast argument to fread/fwrite/read/write.
+
 2001-10-09  Ken Raeburn  <raeburn@mit.edu>
 
        * auth_gssapi.h, auth_gssapi_misc.c, getrpcent.c,
index 89167e58322ca10a1ab00386d3190a7a4e586049..a18939ae697d34a0cc009ae05d5c72c9b2e57fb3 100644 (file)
@@ -508,7 +508,7 @@ static bool_t marshall_new_creds(auth, auth_msg, client_handle)
          creds.client_handle.value = NULL;
      }
      
-     xdrmem_create(&xdrs, AUTH_PRIVATE(auth)->cred_buf,
+     xdrmem_create(&xdrs, (caddr_t) AUTH_PRIVATE(auth)->cred_buf,
                   MAX_AUTH_BYTES, XDR_ENCODE);
      if (! xdr_authgssapi_creds(&xdrs, &creds)) {
          PRINTF(("marshall_new_creds: failed encoding auth_gssapi_creds\n"));
index 464142a44d6dd82d99f51afc786dbf1da9cbb7ab..f3f2ff15d8ce695dbc5d79c07237ae90851ef1b9 100644 (file)
@@ -53,7 +53,10 @@ static struct clntraw_private {
        CLIENT  client_object;
        XDR     xdr_stream;
        char    _raw_buf[UDPMSGSIZE];
-       char    mashl_callmsg[MCALL_MSG_SIZE];
+        union {
+         struct rpc_msg    mashl_rpcmsg;
+         char              mashl_callmsg[MCALL_MSG_SIZE];
+       } u;
        unsigned int    mcnt;
 } *clntraw_private;
 
@@ -103,7 +106,7 @@ clntraw_create(prog, vers)
        call_msg.rm_call.cb_rpcvers = RPC_MSG_VERSION;
        call_msg.rm_call.cb_prog = prog;
        call_msg.rm_call.cb_vers = vers;
-       xdrmem_create(xdrs, clp->mashl_callmsg, MCALL_MSG_SIZE, XDR_ENCODE); 
+       xdrmem_create(xdrs, clp->u.mashl_callmsg, MCALL_MSG_SIZE, XDR_ENCODE); 
        if (! xdr_callhdr(xdrs, &call_msg)) {
                perror("clnt_raw.c - Fatal header serialization error.");
        }
@@ -148,8 +151,8 @@ call_again:
         */
        xdrs->x_op = XDR_ENCODE;
        XDR_SETPOS(xdrs, 0);
-       ((struct rpc_msg *)clp->mashl_callmsg)->rm_xid ++ ;
-       if ((! XDR_PUTBYTES(xdrs, clp->mashl_callmsg, clp->mcnt)) ||
+       clp->u.mashl_rpcmsg.rm_xid ++ ;
+       if ((! XDR_PUTBYTES(xdrs, clp->u.mashl_callmsg, clp->mcnt)) ||
            (! XDR_PUTLONG(xdrs, &procl)) ||
            (! AUTH_MARSHALL(h->cl_auth, xdrs)) ||
            (! (*xargs)(xdrs, argsp))) {
index b43775e2bb2412517881a2ac65d251d855d346d0..abadf339c4910e154f50b1ee8583518815a2ebc6 100644 (file)
@@ -86,7 +86,10 @@ struct ct_data {
        bool_t          ct_waitset;       /* wait set by clnt_control? */
        struct sockaddr_in ct_addr; 
        struct rpc_err  ct_error;
-       char            ct_mcall[MCALL_MSG_SIZE];       /* marshalled callmsg */
+       union {
+         char          ct_mcall[MCALL_MSG_SIZE];       /* marshalled callmsg */
+         rpc_u_int32   ct_mcalli;
+       } ct_u;
        unsigned int            ct_mpos;                        /* pos after marshal */
        XDR             ct_xdrs;
 };
@@ -191,7 +194,7 @@ clnttcp_create(raddr, prog, vers, sockp, sendsz, recvsz)
        /*
         * pre-serialize the staic part of the call msg and stash it away
         */
-       xdrmem_create(&(ct->ct_xdrs), ct->ct_mcall, MCALL_MSG_SIZE,
+       xdrmem_create(&(ct->ct_xdrs), ct->ct_u.ct_mcall, MCALL_MSG_SIZE,
            XDR_ENCODE);
        if (! xdr_callhdr(&(ct->ct_xdrs), &call_msg)) {
                if (ct->ct_closeit) {
@@ -236,7 +239,7 @@ clnttcp_call(h, proc, xdr_args, args_ptr, xdr_results, results_ptr, timeout)
        register XDR *xdrs = &(ct->ct_xdrs);
        struct rpc_msg reply_msg;
        rpc_u_int32 x_id;
-       rpc_u_int32 *msg_x_id = (rpc_u_int32 *)(ct->ct_mcall);  /* yuk */
+       rpc_u_int32 *msg_x_id = &ct->ct_u.ct_mcalli;    /* yuk */
        register bool_t shipnow;
        int refreshes = 2;
        long procl = proc;
@@ -253,7 +256,7 @@ call_again:
        xdrs->x_op = XDR_ENCODE;
        ct->ct_error.re_status = RPC_SUCCESS;
        x_id = ntohl(--(*msg_x_id));
-       if ((! XDR_PUTBYTES(xdrs, ct->ct_mcall, ct->ct_mpos)) ||
+       if ((! XDR_PUTBYTES(xdrs, ct->ct_u.ct_mcall, ct->ct_mpos)) ||
            (! XDR_PUTLONG(xdrs, &procl)) ||
            (! AUTH_MARSHALL(h->cl_auth, xdrs)) ||
            (! AUTH_WRAP(h->cl_auth, xdrs, xdr_args, args_ptr))) {
@@ -457,7 +460,7 @@ readtcp(ctptr, buf, len)
                }
                break;
        }
-       switch (len = read(ct->ct_sock, buf, len)) {
+       switch (len = read(ct->ct_sock, buf, (size_t) len)) {
 
        case 0:
                /* premature eof */
@@ -484,7 +487,7 @@ writetcp(ctptr, buf, len)
        register int i, cnt;
 
        for (cnt = len; cnt > 0; cnt -= i, buf += i) {
-               if ((i = write(ct->ct_sock, buf, cnt)) == -1) {
+               if ((i = write(ct->ct_sock, buf, (size_t) cnt)) == -1) {
                        ct->ct_error.re_errno = errno;
                        ct->ct_error.re_status = RPC_CANTSEND;
                        return (-1);
index 798622e2542a52114da6a8f1ffc581888b227cf7..78102269e99ee008998b3c4f685612bb1b01d59b 100644 (file)
@@ -263,7 +263,7 @@ call_again:
        /*
         * the transaction is the first thing in the out buffer
         */
-       (*(unsigned short *)(cu->cu_outbuf))++;
+       (*(rpc_u_int32 *)(void *)(cu->cu_outbuf))++;
        if ((! XDR_PUTLONG(xdrs, &procl)) ||
            (! AUTH_MARSHALL(cl->cl_auth, xdrs)) ||
            (! AUTH_WRAP(cl->cl_auth, xdrs, xargs, argsp)))
@@ -340,7 +340,8 @@ send_again:
                if (inlen < sizeof(rpc_u_int32))
                        continue;       
                /* see if reply transaction id matches sent id */
-               if (*((rpc_u_int32 *)(cu->cu_inbuf)) != *((rpc_u_int32 *)(cu->cu_outbuf)))
+               if (*((rpc_u_int32 *)(void *)(cu->cu_inbuf)) != 
+                   *((rpc_u_int32 *)(void *)(cu->cu_outbuf)))
                        continue;       
                /* we now assume we have the proper reply */
                break;
index e2d47ecad4222a378e705381a2ff3ebe08b3ab8d..7c9de2f6c86d67c4bf67d57bd38291cffd041c06 100644 (file)
@@ -60,7 +60,7 @@ pmap_set(program, version, protocol, port)
        rpc_u_int32 program;
        rpc_u_int32 version;
        int protocol;
-       unsigned short port;
+       int port;
 {
        struct sockaddr_in myaddress;
        int socket = -1;
index 6cc4b68e90f042a2863c567252dda69615c28782..976b15ec92ff73a52b22d26921a84446343b72b9 100644 (file)
@@ -65,7 +65,7 @@
 #define pmap_getport   gssrpc_pmap_getport
 
 extern bool_t          pmap_set(rpc_u_int32, rpc_u_int32, int, 
-                                unsigned short);
+                                int);
 extern bool_t          pmap_unset(rpc_u_int32, rpc_u_int32);
 extern struct pmaplist *pmap_getmaps(struct sockaddr_in *);
 enum clnt_stat         pmap_rmtcall(struct sockaddr_in *, rpc_u_int32, 
index 1d090f732ed1ec3e1072dca9f107ec35dca16d0c..bc71ec060e85ec8e41a665cb346e35cab8dc25c2 100644 (file)
@@ -151,10 +151,10 @@ xdr_rmtcallres(xdrs, crp)
 {
        caddr_t port_ptr;
 
-       port_ptr = (caddr_t)crp->port_ptr;
+       port_ptr = (caddr_t)(void *)crp->port_ptr;
        if (xdr_reference(xdrs, &port_ptr, sizeof (rpc_u_int32),
            xdr_u_int32) && xdr_u_int32(xdrs, &crp->resultslen)) {
-               crp->port_ptr = (rpc_u_int32 *)port_ptr;
+               crp->port_ptr = (rpc_u_int32 *)(void *)port_ptr;
                return ((*(crp->xdr_results))(xdrs, crp->results_ptr));
        }
        return (FALSE);
index a1de54464f00f6a8df322c154b5f677c603f12fc..831f2fd2da8a9058bbc885342b2d9ba217527546 100644 (file)
@@ -60,10 +60,11 @@ xdr_callmsg(xdrs, cmsg)
                if (cmsg->rm_call.cb_verf.oa_length > MAX_AUTH_BYTES) {
                        return (FALSE);
                }
-               buf = (rpc_int32 *) XDR_INLINE(xdrs, 8 * BYTES_PER_XDR_UNIT
+               buf = (rpc_int32 *) XDR_INLINE(xdrs, (int) (
+                       8 * BYTES_PER_XDR_UNIT
                        + RNDUP(cmsg->rm_call.cb_cred.oa_length)
                        + 2 * BYTES_PER_XDR_UNIT
-                       + RNDUP(cmsg->rm_call.cb_verf.oa_length));
+                       + RNDUP(cmsg->rm_call.cb_verf.oa_length)));
                if (buf != NULL) {
                        IXDR_PUT_LONG(buf, cmsg->rm_xid);
                        IXDR_PUT_ENUM(buf, cmsg->rm_direction);
@@ -125,7 +126,7 @@ xdr_callmsg(xdrs, cmsg)
                                                mem_alloc(oa->oa_length);
                                }
                                buf = (rpc_int32 *)
-                                  XDR_INLINE(xdrs, RNDUP(oa->oa_length));
+                                  XDR_INLINE(xdrs, (int)RNDUP(oa->oa_length));
                                if (buf == NULL) {
                                        if (xdr_opaque(xdrs, oa->oa_base,
                                            oa->oa_length) == FALSE) {
@@ -161,7 +162,7 @@ xdr_callmsg(xdrs, cmsg)
                                                mem_alloc(oa->oa_length);
                                }
                                buf = (rpc_int32 *)
-                                  XDR_INLINE(xdrs, RNDUP(oa->oa_length));
+                                  XDR_INLINE(xdrs, (int)RNDUP(oa->oa_length));
                                if (buf == NULL) {
                                        if (xdr_opaque(xdrs, oa->oa_base,
                                            oa->oa_length) == FALSE) {
index 74e9f91499fcfa639a05c6cc32e94fd4d2f2782c..7429acda1ae7b8b6cd746a4f3fbcacef8fa68214 100644 (file)
@@ -468,7 +468,7 @@ svc_getreqset(readfds)
                                        
                                /* now match message with a registered service*/
                                prog_found = FALSE;
-                               low_vers = 0 - 1;
+                               low_vers = (rpc_u_int32) -1L;
                                high_vers = 0;
                                for (s = svc_head; s != NULL_SVC; s = s->sc_next) {
                                        if (s->sc_prog == r.rq_prog) {
index 5473815d4ce081b4c2c0de329d6f22fc501dfcdb..12000df6607f9221fabf4c5dd7b73264ba0cd703 100644 (file)
@@ -661,7 +661,8 @@ static svc_auth_gssapi_data *create_client()
      if (client_data == NULL)
          return NULL;
      memset((char *) client_data, 0, sizeof(*client_data));
-     L_PRINTF(2, ("create_client: new client_data = %p\n", client_data));
+     L_PRINTF(2, ("create_client: new client_data = %p\n", 
+                 (void *) client_data));
      
      /* set up client data structure */
      client_data->established = 0;
@@ -781,7 +782,7 @@ static void destroy_client(client_data)
      client_list *c, *c2;
 
      PRINTF(("destroy_client: destroying client_data\n"));
-     L_PRINTF(2, ("destroy_client: client_data = %p\n", client_data));
+     L_PRINTF(2, ("destroy_client: client_data = %p\n", (void *) client_data));
 
 #ifdef DEBUG_GSSAPI
      if (svc_debug_gssapi >= 3)
@@ -848,7 +849,7 @@ static void dump_db(msg)
      while (c) {
          client_data = c->client;
          L_PRINTF(3, ("\tclient_data = %p, exp = %d\n",
-                      client_data, client_data->expiration));
+                      (void *) client_data, client_data->expiration));
          c = c->next;
      }
 
@@ -867,7 +868,7 @@ static void clean_client()
          client_data = c->client;
          
          L_PRINTF(2, ("clean_client: client_data = %p\n",
-                      client_data));
+                      (void *) client_data));
          
          if (client_data->expiration < time(0)) {
               PRINTF(("clean_client: client %d expired\n",
@@ -1066,7 +1067,7 @@ static bool_t svc_auth_gssapi_unwrap(auth, in_xdrs, xdr_func, xdr_ptr)
 
      if (! client_data->established) {
          PRINTF(("svc_gssapi_unwrap: not established, noop\n"));
-         return (*xdr_func)(in_xdrs, (auth_gssapi_init_arg *) xdr_ptr);
+         return (*xdr_func)(in_xdrs, (auth_gssapi_init_arg *)(void *) xdr_ptr);
      } else if (! auth_gssapi_unwrap_data(&gssstat, &minor_stat,
                                          client_data->context,
                                          client_data->seq_num-1,
index 5c7b0e9e59a7de03dcce9d4061fa7f2d5c745b03..2d31f9e23935064ef15bca6f13adbbf8dfccc3b1 100644 (file)
@@ -341,7 +341,7 @@ readtcp(xprtptr, buf, len)
 #else
        } while (readfds != mask);
 #endif /* def FD_SETSIZE */
-       if ((len = read(sock, buf, len)) > 0) {
+       if ((len = read(sock, buf, (size_t) len)) > 0) {
                return (len);
        }
 fatal_err:
@@ -363,7 +363,7 @@ writetcp(xprtptr, buf, len)
        register int i, cnt;
 
        for (cnt = len; cnt > 0; cnt -= i, buf += i) {
-               if ((i = write(xprt->xp_sock, buf, cnt)) < 0) {
+               if ((i = write(xprt->xp_sock, buf, (size_t) cnt)) < 0) {
                        ((struct tcp_conn *)(xprt->xp_p1))->strm_stat =
                            XPRT_DIED;
                        return (-1);
index 85c86e576836846fb7a4ff17e6aef8b8565cb30a..fd924c913ac518cc6d875b4a688f859d91978a09 100644 (file)
@@ -214,7 +214,7 @@ xdr_u_long(xdrs, ulp)
        return (FALSE);
       }
     }
-    return (XDR_PUTLONG(xdrs, ulp));
+    return (XDR_PUTLONG(xdrs, (long *)ulp));
   }
   if (xdrs->x_op == XDR_DECODE) {
     return (XDR_GETLONG(xdrs, (long *)ulp));
@@ -267,10 +267,10 @@ xdr_u_short(xdrs, usp)
 
        case XDR_ENCODE:
                l = (unsigned long) *usp;
-               return (XDR_PUTLONG(xdrs, &l));
+               return (XDR_PUTLONG(xdrs, (long *) &l));
 
        case XDR_DECODE:
-               if (!XDR_GETLONG(xdrs, &l)) {
+               if (!XDR_GETLONG(xdrs, (long *) &l)) {
                        return (FALSE);
                }
                *usp = (unsigned short) l;
index 6ee9a742f1128275ddd93b66aff67ac4129ed7ed..5b14307bfa59968f31dd12b147367c42b5503629 100644 (file)
@@ -128,7 +128,7 @@ static bool_t xdralloc_putbytes(xdrs, addr, len)
 {
      if (DynInsert((DynObject) xdrs->x_private,
                   DynSize((DynObject) xdrs->x_private),
-                  addr, len) != DYN_OK)
+                  addr, (int) len) != DYN_OK)
          return FALSE;
      return TRUE;
 }
index 20225045994952ef45ec871ed34891f7e4bcec2d..28faaf24c6b74bb233ffe7fd480a8a4e5faa641c 100644 (file)
@@ -176,7 +176,7 @@ xdrrec_create(xdrs, sendsize, recvsize, tcp_handle, readit, writeit)
        rstrm->readit = readit;
        rstrm->writeit = writeit;
        rstrm->out_finger = rstrm->out_boundry = rstrm->out_base;
-       rstrm->frag_header = (rpc_u_int32 *)rstrm->out_base;
+       rstrm->frag_header = (rpc_u_int32 *)(void *)rstrm->out_base;
        rstrm->out_finger += sizeof(rpc_u_int32);
        rstrm->out_boundry += sendsize;
        rstrm->frag_sent = FALSE;
@@ -199,7 +199,7 @@ xdrrec_getlong(xdrs, lp)
        long *lp;
 {
        register RECSTREAM *rstrm = (RECSTREAM *)(xdrs->x_private);
-       register rpc_int32 *buflp = (rpc_int32 *)(rstrm->in_finger);
+       register rpc_int32 *buflp = (rpc_int32 *)(void *)(rstrm->in_finger);
        int mylong;
 
        /* first try the inline, fast case */
@@ -222,7 +222,7 @@ xdrrec_putlong(xdrs, lp)
        long *lp;
 {
        register RECSTREAM *rstrm = (RECSTREAM *)(xdrs->x_private);
-       register rpc_int32 *dest_lp = ((rpc_int32 *)(rstrm->out_finger));
+       register rpc_int32 *dest_lp = ((rpc_int32 *)(void *)(rstrm->out_finger));
 
        if ((rstrm->out_finger += sizeof(rpc_int32)) > rstrm->out_boundry) {
                /*
@@ -233,7 +233,7 @@ xdrrec_putlong(xdrs, lp)
                rstrm->frag_sent = TRUE;
                if (! flush_out(rstrm, FALSE))
                        return (FALSE);
-               dest_lp = ((rpc_int32 *)(rstrm->out_finger));
+               dest_lp = ((rpc_int32 *)(void *)(rstrm->out_finger));
                rstrm->out_finger += sizeof(rpc_int32);
        }
        *dest_lp = (rpc_int32)htonl((rpc_u_int32)(*lp));
@@ -275,10 +275,10 @@ xdrrec_putbytes(xdrs, addr, len)
        register unsigned int len;
 {
        register RECSTREAM *rstrm = (RECSTREAM *)(xdrs->x_private);
-       register int current;
+       register size_t current;
 
        while (len > 0) {
-               current = (int) ((long)rstrm->out_boundry - 
+               current = (size_t) ((long)rstrm->out_boundry - 
                                 (long)rstrm->out_finger);
                current = (len < current) ? len : current;
                memmove(rstrm->out_finger, addr, current);
@@ -308,7 +308,7 @@ xdrrec_getpos(xdrs)
 #ifdef __osf__
        pos = -1;
 #else
-       pos = lseek((int)rstrm->tcp_handle, (long) 0, 1);
+       pos = lseek((int)rstrm->tcp_handle, (off_t) 0, 1);
 #endif
        if (pos != -1)
                switch (xdrs->x_op) {
@@ -379,7 +379,7 @@ xdrrec_inline(xdrs, len)
 
        case XDR_ENCODE:
                if ((rstrm->out_finger + len) <= rstrm->out_boundry) {
-                       buf = (rpc_int32 *) rstrm->out_finger;
+                       buf = (rpc_int32 *)(void *) rstrm->out_finger;
                        rstrm->out_finger += len;
                }
                break;
@@ -387,7 +387,7 @@ xdrrec_inline(xdrs, len)
        case XDR_DECODE:
                if ((len <= rstrm->fbtbc) &&
                        ((rstrm->in_finger + len) <= rstrm->in_boundry)) {
-                       buf = (rpc_int32 *) rstrm->in_finger;
+                       buf = (rpc_int32 *)(void *) rstrm->in_finger;
                        rstrm->fbtbc -= len;
                        rstrm->in_finger += len;
                }
@@ -482,7 +482,7 @@ xdrrec_endofrecord(xdrs, sendnow)
        len = (long)(rstrm->out_finger) - (long)(rstrm->frag_header) -
           sizeof(unsigned int);
        *(rstrm->frag_header) = htonl((unsigned int)len | LAST_FRAG);
-       rstrm->frag_header = (rpc_u_int32 *)rstrm->out_finger;
+       rstrm->frag_header = (rpc_u_int32 *)(void *)rstrm->out_finger;
        rstrm->out_finger += sizeof(unsigned int);
        return (TRUE);
 }
@@ -505,7 +505,7 @@ flush_out(rstrm, eor)
        if ((*(rstrm->writeit))(rstrm->tcp_handle, rstrm->out_base, (int)len)
                != (int)len)
                return (FALSE);
-       rstrm->frag_header = (rpc_u_int32 *)rstrm->out_base;
+       rstrm->frag_header = (rpc_u_int32 *)(void *)rstrm->out_base;
        rstrm->out_finger = (caddr_t)rstrm->out_base + sizeof(rpc_u_int32);
        return (TRUE);
 }
@@ -536,10 +536,10 @@ get_input_bytes(rstrm, addr, len)
        register caddr_t addr;
        register int len;
 {
-       register int current;
+       register size_t current;
 
        while (len > 0) {
-               current = (int)((long)rstrm->in_boundry - 
+               current = (size_t)((long)rstrm->in_boundry - 
                                (long)rstrm->in_finger);
                if (current == 0) {
                        if (! fill_input_buf(rstrm))
index 6afdb5ad959884457efb6edf4c758d0db970d429..1e524ffc5d97d7c4d2f2f72aeb58a2b77b52b2c8 100644 (file)
@@ -133,7 +133,8 @@ xdrstdio_getbytes(xdrs, addr, len)
        unsigned int len;
 {
 
-       if ((len != 0) && (fread(addr, (int)len, 1, (FILE *)xdrs->x_private) != 1))
+       if ((len != 0) && (fread(addr, (size_t)len, 1, 
+                                (FILE *)xdrs->x_private) != 1))
                return (FALSE);
        return (TRUE);
 }
@@ -145,7 +146,8 @@ xdrstdio_putbytes(xdrs, addr, len)
        unsigned int len;
 {
 
-       if ((len != 0) && (fwrite(addr, (int)len, 1, (FILE *)xdrs->x_private) != 1))
+       if ((len != 0) && (fwrite(addr, (size_t)len, 1, 
+                          (FILE *)xdrs->x_private) != 1))
                return (FALSE);
        return (TRUE);
 }