[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
HAVE_CONFIG_H in tests [was: allocsa compiler warning]
From: |
Eric Blake |
Subject: |
HAVE_CONFIG_H in tests [was: allocsa compiler warning] |
Date: |
Mon, 28 May 2007 09:48:24 -0600 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.10) Gecko/20070221 Thunderbird/1.5.0.10 Mnenhy/0.7.5.666 |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
According to Eric Blake on 5/28/2007 8:51 AM:
> I'm checking this in, so that test-allocsa can compile on cygwin with -Werror:
>
> ../../tests/test-allocsa.c: In function `do_allocation':
> ../../tests/test-allocsa.c:33: warning: left-hand operand of comma
> expression has no effect
> make[4]: *** [test-allocsa.o] Error 1
>
> 2007-05-28 Eric Blake <address@hidden>
>
> * lib/allocsa.h (safe_alloca): Avoid compiler warning.
The above patch is still useful, but in looking at this further, I noticed
the real reason for failure is that test-allocsa.c does not include
config.h in setups that intentionally do not -DHAVE_CONFIG_H on the
command line. Either gnulib-tool --with-tests should ensure the gnulib
testdir adds this define unconditionally, regardless of the rest of the
project, or we should extend to the unit tests the same assumptions that
the rest of gnulib makes (that is, that <config.h> is unconditionally
available). I'm leaning towards the latter, by removing all tests of
#ifdef HAVE_CONFIG_H from the testsuites - is that okay?
- --
Don't work too hard, make some time for fun as well!
Eric Blake address@hidden
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFGWvnI84KuGfSFAYARAoCdAKCat2HgKmWhk0WAUxFM7d5gPadhQgCbBbIW
cNkbEsUUF6rZbKQ5XEX5q/4=
=iHLy
-----END PGP SIGNATURE-----