From: Roger Meier Date: Mon, 25 Oct 2010 12:36:04 +0000 (+0000) Subject: THRIFT-916 partial commit of v3-fix-all-warnings.patch and member initialization... X-Git-Tag: 0.6.0~55 X-Git-Url: https://source.supwisdom.com/gerrit/gitweb?a=commitdiff_plain;h=178f8f2c52907d5a9ad8e7419fdb868ff32c2449;p=common%2Fthrift.git THRIFT-916 partial commit of v3-fix-all-warnings.patch and member initialization in Thrift.h git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@1027092 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/lib/cpp/src/Thrift.h b/lib/cpp/src/Thrift.h index cf766f2c..ab6cf382 100644 --- a/lib/cpp/src/Thrift.h +++ b/lib/cpp/src/Thrift.h @@ -114,7 +114,8 @@ extern TOutput GlobalOutput; class TException : public std::exception { public: - TException() {} + TException(): + message_() {} TException(const std::string& message) : message_(message) {} diff --git a/lib/cpp/src/concurrency/Mutex.cpp b/lib/cpp/src/concurrency/Mutex.cpp index 6d717108..8d52452b 100644 --- a/lib/cpp/src/concurrency/Mutex.cpp +++ b/lib/cpp/src/concurrency/Mutex.cpp @@ -189,6 +189,7 @@ void Mutex::DEFAULT_INITIALIZER(void* arg) { assert(ret == 0); } +#if defined(PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP) || defined(PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP) static void init_with_kind(pthread_mutex_t* mutex, int kind) { pthread_mutexattr_t mutexattr; int ret = pthread_mutexattr_init(&mutexattr); @@ -204,6 +205,7 @@ static void init_with_kind(pthread_mutex_t* mutex, int kind) { ret = pthread_mutexattr_destroy(&mutexattr); assert(ret == 0); } +#endif #ifdef PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP void Mutex::ADAPTIVE_INITIALIZER(void* arg) { diff --git a/lib/cpp/src/server/TNonblockingServer.cpp b/lib/cpp/src/server/TNonblockingServer.cpp index 41056ab3..8f5a9f38 100644 --- a/lib/cpp/src/server/TNonblockingServer.cpp +++ b/lib/cpp/src/server/TNonblockingServer.cpp @@ -265,9 +265,6 @@ void TConnection::workSocket() { * to, or finished receiving the data that it needed to. */ void TConnection::transition() { - - int sz = 0; - // Switch upon the state that we are currently in and move to a new state switch (appState_) {