Re: GNOME CVS: gnome-common kmaraas



Tom Tromey wrote:
> 
> >   -       inp_text = strndup (inp_text, inp_text_limit);
> >   +      (char *)inp_text = strndup (inp_text, inp_text_limit);
> 
> Raja> Could you explain why this change was required -- what was the
> Raja> specific compiler warning?
> 
> I agree.  I removed this patch and recompiled with -Wall.  No
> complaints on my Red Hat 4 box.
> 
> Also, IMHO, lvalue casts are bad.  I'm suprised they're even valid.
> 
> Tom

I'm using Red Hat 5.0 and egcs-1.0.2. Maybe this compiler is too
agressive when issuing warnings? I get a warning waying 'assignment
makes pointer from integer without a cast'. Would it be better to force
strndup to return const char * or would a better solution be to force me
to return to my study with numerous copies of 'The C programming
language'? ;-)

Cheers
Kjartan



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]