[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
warning in AC_CHECK_DECL
From: |
Eric Blake |
Subject: |
warning in AC_CHECK_DECL |
Date: |
Wed, 15 Feb 2006 06:40:56 -0700 |
User-agent: |
Mozilla Thunderbird 1.0.2 (Windows/20050317) |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Without this patch, AC_FUNC_STRERROR_R (and anything else that uses
AC_CHECK_DECL) gets set incorrectly when configuring with gcc and
CFLAGS='-Wall -Werror'. For example, CVS head tar grabbed the wrong value
(leading to another bug report against gnulib argp-help's unused variable
when strerror_r is not found):
configure:11302: checking whether strerror_r is declared
configure:11326: gcc -c -g2 -Wall -Werror conftest.c >&5
conftest.c: In function `main':
conftest.c:135: warning: unused variable `p'
configure:11332: $? = 1
...
| int
| main ()
| {
| #ifndef strerror_r
| char *p = (char *) strerror_r;
| #endif
|
| ;
| return 0;
| }
2006-02-15 Eric Blake <address@hidden>
* lib/autoconf/general.m4 (AC_CHECK_DECL): Avoid unused variable
warning.
- --
Life is short - so eat dessert first!
Eric Blake address@hidden
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFD8y9o84KuGfSFAYARAuktAJ4/CLKHF0ZVPl9qE0Ygp4oKbSUNaACfeqND
2z+oG4/fDMSCepfbxlkOG4c=
=8RlE
-----END PGP SIGNATURE-----
Index: lib/autoconf/general.m4
===================================================================
RCS file: /sources/autoconf/autoconf/lib/autoconf/general.m4,v
retrieving revision 1.888
diff -u -p -r1.888 general.m4
--- lib/autoconf/general.m4 6 Jan 2006 00:10:37 -0000 1.888
+++ lib/autoconf/general.m4 15 Feb 2006 13:38:07 -0000
@@ -1,7 +1,7 @@
# This file is part of Autoconf. -*- Autoconf -*-
# Parameterized macros.
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
-# 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+# 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -2433,6 +2433,8 @@ AC_CACHE_CHECK([whether $1 is declared],
[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT([$4])],
[#ifndef $1
char *p = (char *) $1;
+ if (p)
+ return 0;
#endif
])],
[AS_VAR_SET(ac_Symbol, yes)],
- warning in AC_CHECK_DECL,
Eric Blake <=