From 53a3b39da1241ba43f63f1515f6ef5167b182cae Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Thu, 2 Jun 2016 09:46:12 -0400 Subject: 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. --- src/or/onion.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/or/onion.c') diff --git a/src/or/onion.c b/src/or/onion.c index 4bed7ae226..26a4f857e9 100644 --- a/src/or/onion.c +++ b/src/or/onion.c @@ -38,7 +38,7 @@ typedef struct onion_queue_t { /** Array of queues of circuits waiting for CPU workers. An element is NULL * if that queue is empty.*/ -TOR_TAILQ_HEAD(onion_queue_head_t, onion_queue_t) +static TOR_TAILQ_HEAD(onion_queue_head_t, onion_queue_t) ol_list[MAX_ONION_HANDSHAKE_TYPE+1] = { TOR_TAILQ_HEAD_INITIALIZER(ol_list[0]), /* tap */ TOR_TAILQ_HEAD_INITIALIZER(ol_list[1]), /* fast */ -- cgit v1.2.3-54-g00ecf