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 cf766f2..ab6cf38 100644
--- a/lib/cpp/src/Thrift.h
+++ b/lib/cpp/src/Thrift.h
@@ -114,7 +114,8 @@
 
 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 6d71710..8d52452 100644
--- a/lib/cpp/src/concurrency/Mutex.cpp
+++ b/lib/cpp/src/concurrency/Mutex.cpp
@@ -189,6 +189,7 @@
   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 @@
   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 41056ab..8f5a9f3 100644
--- a/lib/cpp/src/server/TNonblockingServer.cpp
+++ b/lib/cpp/src/server/TNonblockingServer.cpp
@@ -265,9 +265,6 @@
  * 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_) {