NetBSD Problem Report #16601

Received: (qmail 26528 invoked from network); 1 May 2002 19:52:24 -0000
Message-Id: <200205011952.g41JqOF00904@sheep>
Date: Wed, 1 May 2002 21:52:25 +0200 (MEST)
From: o.vd.linden@quicknet.nl
Reply-To: o.vd.linden@quicknet.nl
To: gnats-bugs@gnats.netbsd.org
Subject: const type mismatches for some rpc functions
X-Send-Pr-Version: 3.95

>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 19:53:00 +0000 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:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.