diff options
author | Pavel Janík <Pavel@Janik.cz> | 2017-03-03 16:20:33 +0100 |
---|---|---|
committer | Pavel Janík <Pavel@Janik.cz> | 2017-03-18 07:59:50 +0100 |
commit | bb2aaeeeeae207c3eaeb12bcae4fb700b601ab51 (patch) | |
tree | 934aac40037cffad17956cf79d8cca5b0081b17a /src/torcontrol.cpp | |
parent | 3d857f307be8712b9b251e770d8425717409654b (diff) |
Prevent -Wshadow warnings with gcc versions 4.8.5, 5.3.1 and 6.2.1.
Diffstat (limited to 'src/torcontrol.cpp')
-rw-r--r-- | src/torcontrol.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/torcontrol.cpp b/src/torcontrol.cpp index c49c5d9eb2..19e1b1a368 100644 --- a/src/torcontrol.cpp +++ b/src/torcontrol.cpp @@ -662,26 +662,26 @@ void TorController::reconnect_cb(evutil_socket_t fd, short what, void *arg) } /****** Thread ********/ -struct event_base *base; +struct event_base *gBase; boost::thread torControlThread; static void TorControlThread() { - TorController ctrl(base, GetArg("-torcontrol", DEFAULT_TOR_CONTROL)); + TorController ctrl(gBase, GetArg("-torcontrol", DEFAULT_TOR_CONTROL)); - event_base_dispatch(base); + event_base_dispatch(gBase); } void StartTorControl(boost::thread_group& threadGroup, CScheduler& scheduler) { - assert(!base); + assert(!gBase); #ifdef WIN32 evthread_use_windows_threads(); #else evthread_use_pthreads(); #endif - base = event_base_new(); - if (!base) { + gBase = event_base_new(); + if (!gBase) { LogPrintf("tor: Unable to create event_base\n"); return; } @@ -691,18 +691,18 @@ void StartTorControl(boost::thread_group& threadGroup, CScheduler& scheduler) void InterruptTorControl() { - if (base) { + if (gBase) { LogPrintf("tor: Thread interrupt\n"); - event_base_loopbreak(base); + event_base_loopbreak(gBase); } } void StopTorControl() { - if (base) { + if (gBase) { torControlThread.join(); - event_base_free(base); - base = 0; + event_base_free(gBase); + gBase = 0; } } |