THRIFT-3038 clean up remaining volatile issues
Client: C++
This closes #1129
diff --git a/lib/cpp/src/thrift/concurrency/Mutex.cpp b/lib/cpp/src/thrift/concurrency/Mutex.cpp
index d9921aa..e5e50f7 100644
--- a/lib/cpp/src/thrift/concurrency/Mutex.cpp
+++ b/lib/cpp/src/thrift/concurrency/Mutex.cpp
@@ -37,11 +37,10 @@
#ifndef THRIFT_NO_CONTENTION_PROFILING
-static sig_atomic_t mutexProfilingSampleRate = 0;
+static int32_t mutexProfilingCounter = 0;
+static int32_t mutexProfilingSampleRate = 0;
static MutexWaitCallback mutexProfilingCallback = 0;
-volatile static sig_atomic_t mutexProfilingCounter = 0;
-
void enableMutexProfiling(int32_t profilingSampleRate, MutexWaitCallback callback) {
mutexProfilingSampleRate = profilingSampleRate;
mutexProfilingCallback = callback;
diff --git a/lib/cpp/src/thrift/transport/TFileTransport.h b/lib/cpp/src/thrift/transport/TFileTransport.h
index d7fa556..c926c7c 100644
--- a/lib/cpp/src/thrift/transport/TFileTransport.h
+++ b/lib/cpp/src/thrift/transport/TFileTransport.h
@@ -349,7 +349,7 @@
// conditions used to block when the buffer is full or empty
Monitor notFull_, notEmpty_;
- volatile bool closing_;
+ bool closing_;
// To keep track of whether the buffer has been flushed
Monitor flushed_;