From owner-freebsd-current@FreeBSD.ORG Fri Apr 29 15:28:28 2005 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C4CEE16A4CE for ; Fri, 29 Apr 2005 15:28:28 +0000 (GMT) Received: from orb.pobox.com (orb.pobox.com [207.8.226.5]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8D16B43D49 for ; Fri, 29 Apr 2005 15:28:28 +0000 (GMT) (envelope-from discussion-lists@linnet.org) Received: from orb (localhost [127.0.0.1]) by orb.pobox.com (Postfix) with ESMTP id 3370990B; Fri, 29 Apr 2005 11:28:25 -0400 (EDT) Received: from thinkdog.local.linnet.org (host217-40-157-153.in-addr.btopenworld.com [217.40.157.153]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by orb.sasl.smtp.pobox.com (Postfix) with ESMTP id DE66E8D; Fri, 29 Apr 2005 11:28:22 -0400 (EDT) Received: from lists by thinkdog.local.linnet.org with local (Exim 4.43 (FreeBSD)) id 1DRXPH-000OPr-SY; Fri, 29 Apr 2005 16:27:55 +0100 Date: Fri, 29 Apr 2005 16:27:55 +0100 From: Brian Candler To: Lihong Chen Message-ID: <20050429152755.GA93843@uk.tiscali.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.1i cc: current@freebsd.org Subject: Re: buildworld failed with '-O3' in 6-current X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Apr 2005 15:28:28 -0000 On Fri, Apr 29, 2005 at 11:16:33PM +0800, Lihong Chen wrote: > Hi! > I try to buildworld using gcc -O3, but some file will failed. > they are using fuctions not consist with declared, like these: > --- /usr/src/lib/libc/rpc/getpublickey.c.orig Fri Apr 29 02:10:53 2005 > +++ /usr/src/lib/libc/rpc/getpublickey.c Fri Apr 29 02:13:02 2005 > @@ -175,5 +175,5 @@ > if (__getpublickey_LOCAL != NULL) > return(__getpublickey_LOCAL(netname, publickey)); > else > - return(__getpublickey_real(netname, publickey)); > + return(__getpublickey_real((char*)netname, publickey)); > } Surely better to avoid casts, which will hide errors later on. Instead just make things consistent, either by __getpublickey_real(netname, publickey) - char *netname; + const char *netname; or by int getpublickey(netname, publickey) - const char *netname; + char *netname; as appropriate semantically.