[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [tor/master] clang-i386: use house style for public-when-testing variables



commit 2e4f3b36bdfd5118a523b3fdbfadc0415daa0635
Author: Nick Mathewson <nickm@xxxxxxxxxxxxxx>
Date:   Mon May 8 15:38:05 2017 -0400

    clang-i386: use house style for public-when-testing variables
    
    This fixes a warning from jenkins.
---
 src/or/main.h                  | 3 +++
 src/or/networkstatus.h         | 4 +++-
 src/test/test_channelpadding.c | 8 ++++----
 3 files changed, 10 insertions(+), 5 deletions(-)

diff --git a/src/or/main.h b/src/or/main.h
index 915d82b..57aa372 100644
--- a/src/or/main.h
+++ b/src/or/main.h
@@ -92,6 +92,9 @@ STATIC void init_connection_lists(void);
 STATIC void close_closeable_connections(void);
 STATIC void initialize_periodic_events(void);
 STATIC void teardown_periodic_events(void);
+#ifdef TOR_UNIT_TESTS
+extern smartlist_t *connection_array;
+#endif
 #endif
 
 #endif
diff --git a/src/or/networkstatus.h b/src/or/networkstatus.h
index 6a90d70..7d148b4 100644
--- a/src/or/networkstatus.h
+++ b/src/or/networkstatus.h
@@ -139,7 +139,9 @@ void vote_routerstatus_free(vote_routerstatus_t *rs);
 #ifdef TOR_UNIT_TESTS
 STATIC int networkstatus_set_current_consensus_from_ns(networkstatus_t *c,
                                                 const char *flavor);
-#endif // TOR_UNIT_TESTS
+extern networkstatus_t *current_ns_consensus;
+extern networkstatus_t *current_md_consensus;
+#endif
 #endif
 
 #endif
diff --git a/src/test/test_channelpadding.c b/src/test/test_channelpadding.c
index 68d5c58..5d11842 100644
--- a/src/test/test_channelpadding.c
+++ b/src/test/test_channelpadding.c
@@ -1,4 +1,6 @@
 #define TOR_CHANNEL_INTERNAL_
+#define MAIN_PRIVATE
+#define NETWORKSTATUS_PRIVATE
 #include "or.h"
 #include "test.h"
 #include "testsupport.h"
@@ -11,12 +13,10 @@
 #include "config.h"
 #include <event.h>
 #include "compat_time.h"
+#include "main.h"
+#include "networkstatus.h"
 #include "log_test_helpers.h"
 
-extern smartlist_t *connection_array;
-extern networkstatus_t *current_ns_consensus;
-extern networkstatus_t *current_md_consensus;
-
 int channelpadding_get_netflow_inactive_timeout_ms(channel_t *chan);
 int64_t channelpadding_compute_time_until_pad_for_netflow(channel_t *chan);
 int channelpadding_send_disable_command(channel_t*);

_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits