summaryrefslogtreecommitdiff
path: root/m4
diff options
context:
space:
mode:
authorDaniel Johnson <daniel@daniel-johnson.org>2010-03-23 13:43:34 +0100
committerDaniel Stenberg <daniel@haxx.se>2010-03-23 13:43:34 +0100
commit25116bbc54ac6dd9b9b36e8eb5c98bce3915e840 (patch)
tree4fb2c1f308f5a0ef026a97a89d4e6d85ca2cc166 /m4
parent7ce764fe7cd96d714c5bb6432bbba56c4cb56b37 (diff)
downloadc-ares-25116bbc54ac6dd9b9b36e8eb5c98bce3915e840.tar.gz
c-ares-25116bbc54ac6dd9b9b36e8eb5c98bce3915e840.tar.bz2
c-ares-25116bbc54ac6dd9b9b36e8eb5c98bce3915e840.zip
Fix warnings for clang
Diffstat (limited to 'm4')
-rw-r--r--m4/cares-compilers.m49
1 files changed, 7 insertions, 2 deletions
diff --git a/m4/cares-compilers.m4 b/m4/cares-compilers.m4
index ae32988..3a57389 100644
--- a/m4/cares-compilers.m4
+++ b/m4/cares-compilers.m4
@@ -835,11 +835,11 @@ AC_DEFUN([CARES_SET_COMPILER_WARNING_OPTS], [
#
if test "$want_warnings" = "yes"; then
dnl All versions of clang support the same warnings as at least
- dnl gcc 4.2.1.
+ dnl gcc 4.2.1 except -Wunused.
tmp_CFLAGS="$tmp_CFLAGS -pedantic"
tmp_CFLAGS="$tmp_CFLAGS -Wall -Wextra"
tmp_CFLAGS="$tmp_CFLAGS -Wpointer-arith -Wwrite-strings"
- tmp_CFLAGS="$tmp_CFLAGS -Wunused -Wshadow"
+ tmp_CFLAGS="$tmp_CFLAGS -Wshadow"
tmp_CFLAGS="$tmp_CFLAGS -Winline -Wnested-externs"
tmp_CFLAGS="$tmp_CFLAGS -Wmissing-declarations"
tmp_CFLAGS="$tmp_CFLAGS -Wmissing-prototypes"
@@ -853,6 +853,11 @@ AC_DEFUN([CARES_SET_COMPILER_WARNING_OPTS], [
tmp_CFLAGS="$tmp_CFLAGS -Wcast-align"
tmp_CFLAGS="$tmp_CFLAGS -Wno-system-headers"
tmp_CFLAGS="$tmp_CFLAGS -Wshorten-64-to-32"
+ #
+ dnl Only clang 1.1 or later
+ if test "$compiler_num" -ge "101"; then
+ tmp_CFLAGS="$tmp_CFLAGS -Wunused"
+ fi
fi
;;
#