aboutsummaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2019-12-02 17:04:17 -0500
committerNick Mathewson <nickm@torproject.org>2020-01-09 07:30:35 -0500
commit3ce2304c6d031020cd8a1f00dee6e87fbf40ecd4 (patch)
treeafdc129a9f9a2646aa814ab6571c88f6f4eb8295 /src/test
parent792e5b24039f008648ace6136ab10cc869e65afc (diff)
downloadtor-3ce2304c6d031020cd8a1f00dee6e87fbf40ecd4.tar.gz
tor-3ce2304c6d031020cd8a1f00dee6e87fbf40ecd4.zip
Use new ENABLE/DISABLE_GCC_WARNING
This is an automated commit, generated by: perl -i -pe 'next if /define/; s/((?:ENABLE|DISABLE)_GCC_WARNING)\(([A-Za-z0-9_\-]+)\)/$1(\"-W$2\")/' src/*/*/*.[ch] src/*/*.[ch]
Diffstat (limited to 'src/test')
-rw-r--r--src/test/test_bt_cl.c4
-rw-r--r--src/test/test_crypto.c4
-rw-r--r--src/test/test_dir_handle_get.c4
-rw-r--r--src/test/test_helpers.c4
-rw-r--r--src/test/test_hs_descriptor.c4
-rw-r--r--src/test/test_microdesc.c4
-rw-r--r--src/test/test_tortls_openssl.c4
7 files changed, 14 insertions, 14 deletions
diff --git a/src/test/test_bt_cl.c b/src/test/test_bt_cl.c
index b29c2c6cbc..59d9280454 100644
--- a/src/test/test_bt_cl.c
+++ b/src/test/test_bt_cl.c
@@ -33,7 +33,7 @@ int a_tangled_web(int x) NOINLINE;
int we_weave(int x) NOINLINE;
#ifdef HAVE_CFLAG_WNULL_DEREFERENCE
-DISABLE_GCC_WARNING(null-dereference)
+DISABLE_GCC_WARNING("-Wnull-dereference")
#endif
int
crash(int x)
@@ -55,7 +55,7 @@ crash(int x)
return crashtype;
}
#ifdef HAVE_CFLAG_WNULL_DEREFERENCE
-ENABLE_GCC_WARNING(null-dereference)
+ENABLE_GCC_WARNING("-Wnull-dereference")
#endif
int
diff --git a/src/test/test_crypto.c b/src/test/test_crypto.c
index 2c57e50a4c..dce3c6d35c 100644
--- a/src/test/test_crypto.c
+++ b/src/test/test_crypto.c
@@ -29,9 +29,9 @@
#if defined(ENABLE_OPENSSL)
#include "lib/crypt_ops/compat_openssl.h"
-DISABLE_GCC_WARNING(redundant-decls)
+DISABLE_GCC_WARNING("-Wredundant-decls")
#include <openssl/dh.h>
-ENABLE_GCC_WARNING(redundant-decls)
+ENABLE_GCC_WARNING("-Wredundant-decls")
#endif /* defined(ENABLE_OPENSSL) */
/** Run unit tests for Diffie-Hellman functionality. */
diff --git a/src/test/test_dir_handle_get.c b/src/test/test_dir_handle_get.c
index ae968eb7e2..2b311a2f2c 100644
--- a/src/test/test_dir_handle_get.c
+++ b/src/test/test_dir_handle_get.c
@@ -55,13 +55,13 @@
#endif /* defined(_WIN32) */
#ifdef HAVE_CFLAG_WOVERLENGTH_STRINGS
-DISABLE_GCC_WARNING(overlength-strings)
+DISABLE_GCC_WARNING("-Woverlength-strings")
/* We allow huge string constants in the unit tests, but not in the code
* at large. */
#endif
#include "vote_descriptors.inc"
#ifdef HAVE_CFLAG_WOVERLENGTH_STRINGS
-ENABLE_GCC_WARNING(overlength-strings)
+ENABLE_GCC_WARNING("-Woverlength-strings")
#endif
#define NS_MODULE dir_handle_get
diff --git a/src/test/test_helpers.c b/src/test/test_helpers.c
index 29743a0d15..751ae265e5 100644
--- a/src/test/test_helpers.c
+++ b/src/test/test_helpers.c
@@ -42,14 +42,14 @@
#include "test/test_connection.h"
#ifdef HAVE_CFLAG_WOVERLENGTH_STRINGS
-DISABLE_GCC_WARNING(overlength-strings)
+DISABLE_GCC_WARNING("-Woverlength-strings")
/* We allow huge string constants in the unit tests, but not in the code
* at large. */
#endif
#include "test_descriptors.inc"
#include "core/or/circuitlist.h"
#ifdef HAVE_CFLAG_WOVERLENGTH_STRINGS
-ENABLE_GCC_WARNING(overlength-strings)
+ENABLE_GCC_WARNING("-Woverlength-strings")
#endif
/* Return a statically allocated string representing yesterday's date
diff --git a/src/test/test_hs_descriptor.c b/src/test/test_hs_descriptor.c
index 9587cae85a..cdd9e22fc6 100644
--- a/src/test/test_hs_descriptor.c
+++ b/src/test/test_hs_descriptor.c
@@ -24,12 +24,12 @@
#include "test/rng_test_helpers.h"
#ifdef HAVE_CFLAG_WOVERLENGTH_STRINGS
-DISABLE_GCC_WARNING(overlength-strings)
+DISABLE_GCC_WARNING("-Woverlength-strings")
/* We allow huge string constants in the unit tests, but not in the code
* at large. */
#endif
#include "test_hs_descriptor.inc"
-ENABLE_GCC_WARNING(overlength-strings)
+ENABLE_GCC_WARNING("-Woverlength-strings")
/* Test certificate encoding put in a descriptor. */
static void
diff --git a/src/test/test_microdesc.c b/src/test/test_microdesc.c
index 804e6c546a..9b751ebc3a 100644
--- a/src/test/test_microdesc.c
+++ b/src/test/test_microdesc.c
@@ -491,7 +491,7 @@ test_md_generate(void *arg)
}
#ifdef HAVE_CFLAG_WOVERLENGTH_STRINGS
-DISABLE_GCC_WARNING(overlength-strings)
+DISABLE_GCC_WARNING("-Woverlength-strings")
/* We allow huge string constants in the unit tests, but not in the code
* at large. */
#endif
@@ -686,7 +686,7 @@ static const char MD_PARSE_TEST_DATA[] =
"id rsa1024 2A8wYpHxnkKJ92orocvIQBzeHlE\n"
;
#ifdef HAVE_CFLAG_WOVERLENGTH_STRINGS
-ENABLE_GCC_WARNING(overlength-strings)
+ENABLE_GCC_WARNING("-Woverlength-strings")
#endif
/** More tests for parsing different kinds of microdescriptors, and getting
diff --git a/src/test/test_tortls_openssl.c b/src/test/test_tortls_openssl.c
index 81e2d3aa4f..0935151c61 100644
--- a/src/test/test_tortls_openssl.c
+++ b/src/test/test_tortls_openssl.c
@@ -16,7 +16,7 @@
/* 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)
+DISABLE_GCC_WARNING("-Wredundant-decls")
#include <openssl/opensslv.h>
@@ -29,7 +29,7 @@ DISABLE_GCC_WARNING(redundant-decls)
#include <openssl/evp.h>
#include <openssl/bn.h>
-ENABLE_GCC_WARNING(redundant-decls)
+ENABLE_GCC_WARNING("-Wredundant-decls")
#include "core/or/or.h"
#include "lib/log/log.h"