summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJoel Klinghed <the_jk@yahoo.com>2017-07-22 01:26:18 +0200
committerJoel Klinghed <the_jk@yahoo.com>2017-07-22 01:29:57 +0200
commitface8e0a7d5f530ee3e5e63ab1e3d6ecd497326b (patch)
tree17444e0125da8e57cd34d3b3bc675d4332d76b47 /src
parentbb61eeb6aecab1492b62426433af7c3c963a060b (diff)
Fix warnings for GCC as well
GCC ignores __attribute__((unused)) when compiling C++ code. (Yes, this is true) GCC -Wmaybe-uninitialized just gives false positives in my experience, so drop it. However, this exposed a problem with AX_APPEND_COMPILE_FLAGS and clang. clang gives a warning, but not an error, when given a -Wno-UNKNOWN-FLAG. So add -Werror as an extra flag to make clang fail on unknown -Wno-UNKNOWN-FLAG
Diffstat (limited to 'src')
-rw-r--r--src/common.hh4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/common.hh b/src/common.hh
index 67c8fa5..95abcaa 100644
--- a/src/common.hh
+++ b/src/common.hh
@@ -7,10 +7,10 @@
# include "config.h"
#endif
-#if HAVE_VAR_ATTRIBUTE_UNUSED
+#if HAVE_VAR_ATTRIBUTE_UNUSED && !defined(__GNUG__)
# define UNUSED(x) __attribute__((unused)) x ## _unused
#else
-# define UNUSED(x) x ## _unused
+# define UNUSED(x) /* x ## _unused */
#endif
#include <cassert>