Re: buildworld failed with '-O3' in 6-current

From: Lihong Chen <lihong.chen_at_gmail.com>
Date: Sat, 30 Apr 2005 23:09:16 +0800
Yes, I agree!

On 4/29/05, Brian Candler <B.Candler_at_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
> > _at__at_ -175,5 +175,5 _at__at_
> >       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.
>
Received on Sat Apr 30 2005 - 13:09:17 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:33 UTC