Subject: lib/16601: const type mismatches for some rpc functions
To: None <gnats-bugs@gnats.netbsd.org>
From: None <o.vd.linden@quicknet.nl>
List: netbsd-bugs
Date: 05/01/2002 21:52:25
>Number: 16601
>Category: lib
>Synopsis: const type mismatches for some rpc functions
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: lib-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Wed May 01 12:53:00 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator: Onno van der Linden
>Release: NetBSD 1.5ZC
>Organization:
>Environment:
System: NetBSD sheep 1.5ZC NetBSD 1.5ZC (SHEEP) #0: Tue Apr 30 14:00:23 MEST 2002 onno@sheep:/usr/src/sys/arch/i386/compile/SHEEP i386
Architecture: i386
Machine: i386
>Description:
While porting the stuff in lib/libc/rpc to Tru64 5.1a I noticed
lots of warnings about "promoting to different type". I even got
compile errors on /usr/src/lib/libc/rpc/clnt_vc.c.
/usr/src/include/rpc/clnt.h says (as does rpc_clnt_create(3))
extern CLIENT *clnt_vc_create __P((const int, const struct netbuf *,
const rpcprog_t, const rpcvers_t,
const u_int, const u_int));
/usr/src/lib/libc/rpc/clnt_vc.c says
CLIENT *
clnt_vc_create(fd, raddr, prog, vers, sendsz, recvsz)
int fd;
const struct netbuf *raddr;
rpcprog_t prog;
rpcvers_t vers;
u_int sendsz;
u_int recvsz;
{
[ and near the and of this function which generated an error from the
Compaq C compiler ]
sendsz = __rpc_get_t_size(si.si_af, si.si_proto, (int)sendsz);
recvsz = __rpc_get_t_size(si.si_af, si.si_proto, (int)recvsz);
>How-To-Repeat:
Compile lib/libc/rpc on Tru64 5.1a with the Compaq C compiler.
>Fix:
constify the stuff in /usr/src/lib/libc/rpc like /usr/src/include/rpc
or
deconstify the stuff in /usr/src/include/rpc and change the manual
page accordingly.
>Release-Note:
>Audit-Trail:
>Unformatted: