From owner-freebsd-current@FreeBSD.ORG Sat Apr 30 15:09:17 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 BA1DD16A4CE for ; Sat, 30 Apr 2005 15:09:17 +0000 (GMT) Received: from wproxy.gmail.com (wproxy.gmail.com [64.233.184.203]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4AF6A43D41 for ; Sat, 30 Apr 2005 15:09:17 +0000 (GMT) (envelope-from lihong.chen@gmail.com) Received: by wproxy.gmail.com with SMTP id 69so1158470wri for ; Sat, 30 Apr 2005 08:09:16 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=mc7+I7UMFZ9oHRpqeci8lXZtIuVfeFwRbdtyBFWriiGf4ptDFMauLBGzXEymb6MOiyrCIRoqNd4wG4DV/7qxjNe0eW8aPPVmiyg4wTc8zFK0hUKzWU9xVk9fQpEhlrUZUNtbq9WuC2nBEx1fgc18vfCuqlT0PRlEfmgjMLkxTdM= Received: by 10.54.125.20 with SMTP id x20mr1845933wrc; Sat, 30 Apr 2005 08:09:16 -0700 (PDT) Received: by 10.54.2.75 with HTTP; Sat, 30 Apr 2005 08:09:16 -0700 (PDT) Message-ID: Date: Sat, 30 Apr 2005 23:09:16 +0800 From: Lihong Chen To: Brian Candler In-Reply-To: <20050429152755.GA93843@uk.tiscali.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <20050429152755.GA93843@uk.tiscali.com> 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 Reply-To: Lihong Chen List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Apr 2005 15:09:17 -0000 Yes, I agree! On 4/29/05, Brian Candler wrote: > 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 !=3D NULL) > > return(__getpublickey_LOCAL(netname, publickey)); > > else > > - return(__getpublickey_real(netname, publickey)); > > + return(__getpublickey_real((char*)netname, publickey)); > > } >=20 > Surely better to avoid casts, which will hide errors later on. Instead ju= st > make things consistent, either by >=20 > __getpublickey_real(netname, publickey) > - char *netname; > + const char *netname; >=20 > or by >=20 > int getpublickey(netname, publickey) > - const char *netname; > + char *netname; >=20 > as appropriate semantically. >