diff options
author | Ulrich Drepper <drepper@redhat.com> | 2009-04-26 20:12:37 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2009-04-26 20:12:37 +0000 |
commit | 6cc8844f1dd985360f662e78ff2272039025635f (patch) | |
tree | 6ebb2abaf95bc129ee800558415fdcfac72642ce /sunrpc | |
parent | 5efe86507d871acd6f52d8d25ee437b7394ac6d5 (diff) | |
download | glibc-6cc8844f1dd985360f662e78ff2272039025635f.tar.gz glibc-6cc8844f1dd985360f662e78ff2272039025635f.tar.xz glibc-6cc8844f1dd985360f662e78ff2272039025635f.zip |
* sysdeps/unix/sysv/linux/dl-osinfo.h (dl_fatal): Remove inline
from definition. * sysdeps/x86_64/dl-machine.h (elf_machine_rela): Don't define label if it is not used. * elf/dl-profile.c (_dl_start_profile): Define real-type variant of gmon_hist_hdr and gmon_hdr structures and use them. * elf/dl-load.c (open_verify): Add temporary variable to avoid warning. * nscd/nscd_helper.c (get_mapping): Avoid casts to avoid warnings. * sunrpc/clnt_raw.c (clntraw_private_s): Use union in definition to avoid cast. * inet/rexec.c (rexec_af): Make sa2 a union to avoid warnings. * inet/rcmd.c (rcmd_af): Make from a union of the various needed types to avoid warnings. (iruserok_af): Use ss_family instead of casts. * gmon/gmon.c (write_hist): Define real-type variant of gmon_hist_hdr structure and use it. (write_gmon): Likewise for gmon_hdr. * sysdeps/unix/sysv/linux/readv.c: Avoid declaration of replacement function if we are not going to define it. * sysdeps/unix/sysv/linux/writev.c: Likewise. * inet/inet6_option.c (optin_alloc): Add temporary variable to avoid warning. * libio/strfile.h (struct _IO_streambuf): Use correct type and name of VTable element. * libio/iovsprintf.c: Avoid casts to avoid warnings. * libio/iovsscanf.c: Likewise. * libio/vasprintf.c: Likewise. * libio/vsnprintf.c: Likewise. * stdio-common/isoc99_vsscanf.c: Likewise. * stdlib/strfmon_l.c: Likewise. * debug/vasprintf_chk.c: Likewise. * debug/vsnprintf_chk.c: Likewise. * debug/vsprintf_chk.c: Likewise.
Diffstat (limited to 'sunrpc')
-rw-r--r-- | sunrpc/clnt_raw.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/sunrpc/clnt_raw.c b/sunrpc/clnt_raw.c index 44ea03efb7..74d90c8051 100644 --- a/sunrpc/clnt_raw.c +++ b/sunrpc/clnt_raw.c @@ -57,7 +57,11 @@ struct clntraw_private_s CLIENT client_object; XDR xdr_stream; char _raw_buf[UDPMSGSIZE]; - char mashl_callmsg[MCALL_MSG_SIZE]; + union + { + char msg[MCALL_MSG_SIZE]; + u_long rm_xid; + } mashl_callmsg; u_int mcnt; }; #ifdef _RPC_THREAD_SAFE_ @@ -111,7 +115,8 @@ clntraw_create (u_long prog, u_long vers) call_msg.rm_call.cb_rpcvers = RPC_MSG_VERSION; call_msg.rm_call.cb_prog = prog; call_msg.rm_call.cb_vers = vers; - INTUSE(xdrmem_create) (xdrs, clp->mashl_callmsg, MCALL_MSG_SIZE, XDR_ENCODE); + INTUSE(xdrmem_create) (xdrs, clp->mashl_callmsg.msg, MCALL_MSG_SIZE, + XDR_ENCODE); if (!INTUSE(xdr_callhdr) (xdrs, &call_msg)) { perror (_ ("clnt_raw.c: fatal header serialization error")); @@ -156,8 +161,11 @@ 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)) || + /* Just checking the union definition to access rm_xid is correct. */ + if (offsetof (struct rpc_msg, rm_xid) != 0) + abort (); + clp->mashl_callmsg.rm_xid++; + if ((!XDR_PUTBYTES (xdrs, clp->mashl_callmsg.msg, clp->mcnt)) || (!XDR_PUTLONG (xdrs, (long *) &proc)) || (!AUTH_MARSHALL (h->cl_auth, xdrs)) || (!(*xargs) (xdrs, argsp))) |