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