You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by ma...@apache.org on 2019/04/24 02:23:11 UTC
[trafficserver] branch master updated: cppcheck: Change to C++
style pointer casting in Thread.cc
This is an automated email from the ASF dual-hosted git repository.
maskit pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git
The following commit(s) were added to refs/heads/master by this push:
new c6d08f4 cppcheck: Change to C++ style pointer casting in Thread.cc
c6d08f4 is described below
commit c6d08f430588cda0dd3f3b34e3ac902532d31adc
Author: bichen <bi...@linkedin.com>
AuthorDate: Tue Apr 23 10:12:44 2019 -0700
cppcheck: Change to C++ style pointer casting in Thread.cc
---
iocore/eventsystem/Thread.cc | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/iocore/eventsystem/Thread.cc b/iocore/eventsystem/Thread.cc
index f51232d..e239bf3 100644
--- a/iocore/eventsystem/Thread.cc
+++ b/iocore/eventsystem/Thread.cc
@@ -50,13 +50,13 @@ static bool initialized ATS_UNUSED = ([]() -> bool {
Thread::Thread()
{
mutex = new_ProxyMutex();
- MUTEX_TAKE_LOCK(mutex, (EThread *)this);
+ MUTEX_TAKE_LOCK(mutex, static_cast<EThread *>(this));
mutex->nthread_holding += THREAD_MUTEX_THREAD_HOLDING;
}
Thread::~Thread()
{
- ink_release_assert(mutex->thread_holding == (EThread *)this);
+ ink_release_assert(mutex->thread_holding == static_cast<EThread *>(this));
if (ink_thread_getspecific(Thread::thread_data_key) == this) {
// Clear pointer to this object stored in thread-specific data by set_specific.
@@ -65,7 +65,7 @@ Thread::~Thread()
}
mutex->nthread_holding -= THREAD_MUTEX_THREAD_HOLDING;
- MUTEX_UNTAKE_LOCK(mutex, (EThread *)this);
+ MUTEX_UNTAKE_LOCK(mutex, static_cast<EThread *>(this));
}
///////////////////////////////////////////////