Re: Warnings when under GCC 3.4



On Tue, 2004-05-18 at 16:16 -0400, Colin Walters wrote:
> On Tue, 2004-05-18 at 15:27, David Malcolm wrote:
> > When trying to build gnome-vfs with gcc 3.4 I get various errors (see
> > below); it looks like every instance of the VERIFY_STRING_RESULT with
> > NULL as the second arg causes a warning; this causes warnings in
> > methods/http-authn.c and in test/test-uri.c
> > 
> > The attached patch makes it build without warnings.
> 
> Really?  It seems weird to me.  Which is it warning about?  the strcmp
> or the test_failed function?  I assume it's the strcmp, because that's
> what your patch appears to work around.  In that case, GCC should be
> smart enough to realize that the only code paths to the call, the
> arguments must be non-NULL.

It appeared to be warning about the strcmp which is why I coded around
it.  My guess is that the compiler didn't shortcircuit the && clauses,
which is arguably a compiler bug; version is "gcc34 (GCC) 3.4.0 (Red Hat
Linux 3.4.0-1)".  Grrr.

> 
> Right?
> 
> _______________________________________________
> gnome-vfs-list mailing list
> gnome-vfs-list gnome org
> http://mail.gnome.org/mailman/listinfo/gnome-vfs-list




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