THRIFT-916 partial commit of v3-fix-all-warnings.patch and member initialization...
authorRoger Meier <roger@apache.org>
Mon, 25 Oct 2010 12:36:04 +0000 (12:36 +0000)
committerRoger Meier <roger@apache.org>
Mon, 25 Oct 2010 12:36:04 +0000 (12:36 +0000)
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@1027092 13f79535-47bb-0310-9956-ffa450edef68

lib/cpp/src/Thrift.h
lib/cpp/src/concurrency/Mutex.cpp
lib/cpp/src/server/TNonblockingServer.cpp

index cf766f2..ab6cf38 100644 (file)
@@ -114,7 +114,8 @@ extern TOutput GlobalOutput;
 
 class TException : public std::exception {
  public:
-  TException() {}
+  TException():
+    message_() {}
 
   TException(const std::string& message) :
     message_(message) {}
index 6d71710..8d52452 100644 (file)
@@ -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) {
index 41056ab..8f5a9f3 100644 (file)
@@ -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_) {