aboutsummaryrefslogtreecommitdiff
path: root/src/common
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2016-06-01 13:38:36 -0400
committerNick Mathewson <nickm@torproject.org>2016-06-11 10:11:53 -0400
commit9bbd6502f09dd46179e7ca4a713f2ae24bfa79ef (patch)
tree5fe20b810648c465df4779132beebc0fc61412b8 /src/common
parentad16c5528663489000ee3a7454a9bbff2e41f7f0 (diff)
downloadtor-9bbd6502f09dd46179e7ca4a713f2ae24bfa79ef.tar.gz
tor-9bbd6502f09dd46179e7ca4a713f2ae24bfa79ef.zip
Use autoconf, not gcc version, to decide which warnings we have
This gives more accurate results under Clang, which can only help us detect more warnings in more places. Fixes bug 19216; bugfix on 0.2.0.1-alpha
Diffstat (limited to 'src/common')
-rw-r--r--src/common/torlog.h2
-rw-r--r--src/common/tortls.c4
2 files changed, 1 insertions, 5 deletions
diff --git a/src/common/torlog.h b/src/common/torlog.h
index 578af7caea..80f37e0e48 100644
--- a/src/common/torlog.h
+++ b/src/common/torlog.h
@@ -176,7 +176,7 @@ void log_fn_ratelim_(struct ratelim_t *ratelim, int severity,
const char *format, ...)
CHECK_PRINTF(5,6);
-#if defined(__GNUC__)
+#if defined(__GNUC__) && __GNUC__ <= 3
/* These are the GCC varidaic macros, so that older versions of GCC don't
* break. */
diff --git a/src/common/tortls.c b/src/common/tortls.c
index fc684189b1..252da6295e 100644
--- a/src/common/tortls.c
+++ b/src/common/tortls.c
@@ -26,11 +26,9 @@
#include "compat.h"
-#if GCC_VERSION >= 402
/* Some versions of OpenSSL declare SSL_get_selected_srtp_profile twice in
* srtp.h. Suppress the GCC warning so we can build with -Wredundant-decl. */
DISABLE_GCC_WARNING(redundant-decls)
-#endif
#include <openssl/opensslv.h>
#include "crypto.h"
@@ -48,9 +46,7 @@ DISABLE_GCC_WARNING(redundant-decls)
#include <openssl/bn.h>
#include <openssl/rsa.h>
-#if GCC_VERSION >= 402
ENABLE_GCC_WARNING(redundant-decls)
-#endif
#ifdef USE_BUFFEREVENTS
#include <event2/bufferevent_ssl.h>