From 03e2e1328362ea606f07e45cfebcdea7109380fb Mon Sep 17 00:00:00 2001 From: Vijay Pai Date: Tue, 20 Feb 2018 20:49:36 -0800 Subject: [PATCH] Minor fixes --- src/core/lib/gprpp/thd_posix.cc | 4 ++-- test/core/iomgr/ev_epollsig_linux_test.cc | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/core/lib/gprpp/thd_posix.cc b/src/core/lib/gprpp/thd_posix.cc index 9ed6758b310..4cc3d2be4d6 100644 --- a/src/core/lib/gprpp/thd_posix.cc +++ b/src/core/lib/gprpp/thd_posix.cc @@ -131,7 +131,7 @@ Thread::Thread(const char* thd_name, void (*thd_body)(void* arg), void* arg, *success = alive_; } - id_ = reinterpret_cast(p); + id_ = gpr_thd_id(p); GPR_ASSERT(pthread_attr_destroy(&attr) == 0); if (!alive_) { @@ -143,7 +143,7 @@ Thread::Thread(const char* thd_name, void (*thd_body)(void* arg), void* arg, void Thread::Join() { if (alive_) { - pthread_join(reinterpret_cast(id_), nullptr); + pthread_join(pthread_t(id_), nullptr); } joined_ = true; } diff --git a/test/core/iomgr/ev_epollsig_linux_test.cc b/test/core/iomgr/ev_epollsig_linux_test.cc index e3ee67e023a..4ec6fc8b0d4 100644 --- a/test/core/iomgr/ev_epollsig_linux_test.cc +++ b/test/core/iomgr/ev_epollsig_linux_test.cc @@ -22,10 +22,10 @@ #include "src/core/lib/iomgr/ev_epollsig_linux.h" #include "src/core/lib/iomgr/ev_posix.h" -#include #include #include #include +#include #include #include