Date: Sat, 30 Apr 2005 23:09:16 +0800 From: Lihong Chen <lihong.chen@gmail.com> To: Brian Candler <B.Candler@pobox.com> Cc: current@freebsd.org Subject: Re: buildworld failed with '-O3' in 6-current Message-ID: <a50d5a50050430080910371898@mail.gmail.com> In-Reply-To: <20050429152755.GA93843@uk.tiscali.com> References: <a50d5a5005042908161ca3d415@mail.gmail.com> <20050429152755.GA93843@uk.tiscali.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Yes, I agree! On 4/29/05, Brian Candler <B.Candler@pobox.com> 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. >
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?a50d5a50050430080910371898>