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
This commit is contained in:
Nick Mathewson
2016-06-01 13:38:36 -04:00
parent ad16c55286
commit 9bbd6502f0
10 changed files with 77 additions and 129 deletions
+1 -1
View File
@@ -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. */
-4
View File
@@ -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>