aboutsummaryrefslogtreecommitdiff
path: root/src/test/test_tortls.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2016-06-02 09:46:12 -0400
committerNick Mathewson <nickm@torproject.org>2016-06-11 10:11:54 -0400
commit53a3b39da1241ba43f63f1515f6ef5167b182cae (patch)
tree558ec394f3a02bb8f2b5e887ff70b82231424143 /src/test/test_tortls.c
parent80f1a2cbbdd0abd509711a5069f31855df5bcd79 (diff)
downloadtor-53a3b39da1241ba43f63f1515f6ef5167b182cae.tar.gz
tor-53a3b39da1241ba43f63f1515f6ef5167b182cae.zip
Add -Wmissing-variable-declarations, with attendant fixes
This is a big-ish patch, but it's very straightforward. Under this clang warning, we're not actually allowed to have a global variable without a previous extern declaration for it. The cases where we violated this rule fall into three roughly equal groups: * Stuff that should have been static. * Stuff that was global but where the extern was local to some other C file. * Stuff that was only global when built for the unit tests, that needed a conditional extern in the headers. The first two were IMO genuine problems; the last is a wart of how we build tests.
Diffstat (limited to 'src/test/test_tortls.c')
-rw-r--r--src/test/test_tortls.c10
1 files changed, 0 insertions, 10 deletions
diff --git a/src/test/test_tortls.c b/src/test/test_tortls.c
index caaada8701..42b9ef7733 100644
--- a/src/test/test_tortls.c
+++ b/src/test/test_tortls.c
@@ -51,9 +51,6 @@
#include "log_test_helpers.h"
#define NS_MODULE tortls
-extern tor_tls_context_t *server_tls_context;
-extern tor_tls_context_t *client_tls_context;
-
#if OPENSSL_VERSION_NUMBER >= OPENSSL_V_SERIES(1,1,0) \
&& !defined(LIBRESSL_VERSION_NUMBER)
#define OPENSSL_OPAQUE
@@ -278,8 +275,6 @@ test_tortls_get_state_description(void *ignored)
tor_free(tls);
}
-extern int tor_tls_object_ex_data_index;
-
static void
test_tortls_get_by_ssl(void *ignored)
{
@@ -790,8 +785,6 @@ get_cipher_by_id(uint16_t id)
return NULL;
}
-extern uint16_t v2_cipher_list[];
-
static void
test_tortls_classify_client_ciphers(void *ignored)
{
@@ -1184,9 +1177,6 @@ test_tortls_get_forced_write_size(void *ignored)
tor_free(tls);
}
-extern uint64_t total_bytes_written_over_tls;
-extern uint64_t total_bytes_written_by_tls;
-
static void
test_tortls_get_write_overhead_ratio(void *ignored)
{