Re: gnome-vfs - compilation error with gcc 3.4



On Tuesday 09 March 2004 23:18, Christophe Fergeau wrote:
> Hi
>
> It would be nice if you gave us the error message you got ;)

http-authn.c: In function `http_authn_self_test':
http-authn.c:503: warning: null argument where non-null required (arg 2)
http-authn.c:527: warning: null argument where non-null required (arg 2)
http-authn.c:538: warning: null argument where non-null required (arg 2)
http-authn.c:543: warning: null argument where non-null required (arg 2)
make[3]: *** [http-authn.lo] Error 1


> I guess it's gcc complaining about strcmp being passed NULL pointers ?
> If so, the warning is harmless, since the strcmp in the macro won't be
> called with NULL parameters because of the tests before it.

Yes, that's correct, but because of the default flags "-Wall" and "-Werror"
the compilation process will be interrupted, so that I had to patch my local
sources of gnome-vfs to get it compiled. 

The configuration option "--enable-compile-warnings=no" didn't work as
advertised, so that "-Wall" and "-Werror" were still passed to gcc and
the compilation failed again.

I suppose that I'm not the only one, so the patch would be useful for others
too. BTW the patch and the additional local variable doesn't harm anybody.
Otherwise, I suppose, this issue may bug other people which will post
to this mailing list. Why not fix it right now and keep the noise level low?

>
> I'm mostly guessing from talks I had with friends on IRC, maybe the
> problem is totally different ;)

Correct.

>
> Anyway, since gcc 3.4 is not an official release yet, I don't think it's
> critical to rush to fix that warning which might (or might not)
> disappear before the final 3.4 release. Can you file this problem on
> bugzilla.gnome.org so that it's not forgotten?

I don't know if it's worth the effort, but if you really think I should file
a bug report which somebody has to read, reprocess, fix, document and close...


Regards,

Gerold


>
> Thanks,
>
> Christophe
>
> Le mar 09/03/2004 à 22:42, Gerold J. Wucherpfennig a écrit :
> > Due to changes in gcc
> >
> > gnome-vfs/test/test-uri.c and
> > gnome-vfs/modules/http-authn.c
> >
> > won't compile with gcc 3.4
> >
> >
> > Here is a quick work-around for this issue.
> > May someone please commit it or even make a better one?
> >
> >
> > The diff:
> >
> >  #define VERIFY_STRING_RESULT(function, expected) \
> >         G_STMT_START
> > {                                                           \
> >                 char *result = function;
> > \
> > +               char *expected2 = expected;\
> >                 if (!((result == NULL && expected == NULL)
> > \
> > -                     || (result != NULL && expected != NULL && strcmp
> > (result, (char *)expected) == 0))) {       \
> > +                     || (result != NULL && expected != NULL && strcmp
> > (result, (char *)expected2) == 0))) {      \
> >                         test_failed ("%s:%s:%s: returned '%s' expected
> > '%s'", __FILE__, __LINE__, #function, result, expected);   \
> >                 }
> > \
> >         } G_STMT_END
> >
> >
> >
> >
> > Regards
> >
> > _______________________________________________
> > desktop-devel-list mailing list
> > desktop-devel-list gnome org
> > http://mail.gnome.org/mailman/listinfo/desktop-devel-list



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