THRIFT-916 compile with -Wall -Wextra without warning on Debian Lenny


git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1036250 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/lib/cpp/src/protocol/TBinaryProtocol.tcc b/lib/cpp/src/protocol/TBinaryProtocol.tcc
index 0f1c34a..3d93348 100644
--- a/lib/cpp/src/protocol/TBinaryProtocol.tcc
+++ b/lib/cpp/src/protocol/TBinaryProtocol.tcc
@@ -54,6 +54,7 @@
 
 template <class Transport_>
 uint32_t TBinaryProtocolT<Transport_>::writeStructBegin(const char* name) {
+  (void) name;
   return 0;
 }
 
@@ -66,6 +67,7 @@
 uint32_t TBinaryProtocolT<Transport_>::writeFieldBegin(const char* name,
                                                        const TType fieldType,
                                                        const int16_t fieldId) {
+  (void) name;
   uint32_t wsize = 0;
   wsize += writeByte((int8_t)fieldType);
   wsize += writeI16(fieldId);
@@ -244,6 +246,7 @@
 uint32_t TBinaryProtocolT<Transport_>::readFieldBegin(std::string& name,
                                                       TType& fieldType,
                                                       int16_t& fieldId) {
+  (void) name;
   uint32_t result = 0;
   int8_t type;
   result += readByte(type);
diff --git a/lib/cpp/src/protocol/TCompactProtocol.tcc b/lib/cpp/src/protocol/TCompactProtocol.tcc
index ed9c281..55b784f 100644
--- a/lib/cpp/src/protocol/TCompactProtocol.tcc
+++ b/lib/cpp/src/protocol/TCompactProtocol.tcc
@@ -131,6 +131,7 @@
  */
 template <class Transport_>
 uint32_t TCompactProtocolT<Transport_>::writeStructBegin(const char* name) {
+  (void) name;
   lastField_.push(lastFieldId_);
   lastFieldId_ = 0;
   return 0;
@@ -286,6 +287,7 @@
     const TType fieldType,
     const int16_t fieldId,
     int8_t typeOverride) {
+  (void) name;
   uint32_t wsize = 0;
 
   // if there's a type override, use that.
@@ -455,6 +457,7 @@
 uint32_t TCompactProtocolT<Transport_>::readFieldBegin(std::string& name,
                                                        TType& fieldType,
                                                        int16_t& fieldId) {
+  (void) name;
   uint32_t rsize = 0;
   int8_t byte;
   int8_t type;
diff --git a/lib/cpp/src/protocol/TDebugProtocol.cpp b/lib/cpp/src/protocol/TDebugProtocol.cpp
index ee82e71..28e175b 100644
--- a/lib/cpp/src/protocol/TDebugProtocol.cpp
+++ b/lib/cpp/src/protocol/TDebugProtocol.cpp
@@ -148,6 +148,7 @@
 uint32_t TDebugProtocol::writeMessageBegin(const std::string& name,
                                            const TMessageType messageType,
                                            const int32_t seqid) {
+  (void) seqid;
   string mtype;
   switch (messageType) {
     case T_CALL      : mtype = "call"   ; break;
diff --git a/lib/cpp/src/protocol/TDenseProtocol.cpp b/lib/cpp/src/protocol/TDenseProtocol.cpp
index b9a3d1f..86e5e28 100644
--- a/lib/cpp/src/protocol/TDenseProtocol.cpp
+++ b/lib/cpp/src/protocol/TDenseProtocol.cpp
@@ -281,6 +281,7 @@
 }
 
 uint32_t TDenseProtocol::writeStructBegin(const char* name) {
+  (void) name;
   uint32_t xfer = 0;
 
   // The TypeSpec stack should be empty if this is the top-level read/write.
@@ -314,6 +315,7 @@
 uint32_t TDenseProtocol::writeFieldBegin(const char* name,
                                          const TType fieldType,
                                          const int16_t fieldId) {
+  (void) name;
   uint32_t xfer = 0;
 
   // Skip over optional fields.
@@ -507,6 +509,7 @@
 }
 
 uint32_t TDenseProtocol::readStructBegin(string& name) {
+  (void) name;
   uint32_t xfer = 0;
 
   if (ts_stack_.empty()) {
@@ -544,6 +547,7 @@
 uint32_t TDenseProtocol::readFieldBegin(string& name,
                                         TType& fieldType,
                                         int16_t& fieldId) {
+  (void) name;
   uint32_t xfer = 0;
 
   // For optional fields, check to see if they are there.
diff --git a/lib/cpp/src/protocol/TJSONProtocol.cpp b/lib/cpp/src/protocol/TJSONProtocol.cpp
index 5b0b18d..d038df4 100644
--- a/lib/cpp/src/protocol/TJSONProtocol.cpp
+++ b/lib/cpp/src/protocol/TJSONProtocol.cpp
@@ -255,6 +255,7 @@
    * Write context data to the transport. Default is to do nothing.
    */
   virtual uint32_t write(TTransport &trans) {
+    (void) trans;
     return 0;
   };
 
@@ -262,6 +263,7 @@
    * Read context data from the transport. Default is to do nothing.
    */
   virtual uint32_t read(TJSONProtocol::LookaheadReader &reader) {
+    (void) reader;
     return 0;
   };
 
@@ -561,6 +563,7 @@
 }
 
 uint32_t TJSONProtocol::writeStructBegin(const char* name) {
+  (void) name;
   return writeJSONObjectStart();
 }
 
@@ -571,6 +574,7 @@
 uint32_t TJSONProtocol::writeFieldBegin(const char* name,
                                         const TType fieldType,
                                         const int16_t fieldId) {
+  (void) name;
   uint32_t result = writeJSONInteger(fieldId);
   result += writeJSONObjectStart();
   result += writeJSONString(getTypeNameForTypeID(fieldType));
@@ -874,6 +878,7 @@
 }
 
 uint32_t TJSONProtocol::readStructBegin(std::string& name) {
+  (void) name;
   return readJSONObjectStart();
 }
 
@@ -884,6 +889,7 @@
 uint32_t TJSONProtocol::readFieldBegin(std::string& name,
                                        TType& fieldType,
                                        int16_t& fieldId) {
+  (void) name;
   uint32_t result = 0;
   // Check if we hit the end of the list
   uint8_t ch = reader_.peek();
diff --git a/lib/cpp/src/protocol/TVirtualProtocol.h b/lib/cpp/src/protocol/TVirtualProtocol.h
index 9133dbe..6c7f519 100644
--- a/lib/cpp/src/protocol/TVirtualProtocol.h
+++ b/lib/cpp/src/protocol/TVirtualProtocol.h
@@ -42,6 +42,9 @@
   uint32_t readMessageBegin(std::string& name,
                             TMessageType& messageType,
                             int32_t& seqid) {
+    (void) name;
+    (void) messageType;
+    (void) seqid;
     throw TProtocolException(TProtocolException::NOT_IMPLEMENTED,
                              "this protocol does not support reading (yet).");
   }
@@ -52,6 +55,7 @@
   }
 
   uint32_t readStructBegin(std::string& name) {
+    (void) name;
     throw TProtocolException(TProtocolException::NOT_IMPLEMENTED,
                              "this protocol does not support reading (yet).");
   }
@@ -64,6 +68,9 @@
   uint32_t readFieldBegin(std::string& name,
                           TType& fieldType,
                           int16_t& fieldId) {
+    (void) name;
+    (void) fieldType;
+    (void) fieldId;
     throw TProtocolException(TProtocolException::NOT_IMPLEMENTED,
                              "this protocol does not support reading (yet).");
   }
@@ -74,6 +81,9 @@
   }
 
   uint32_t readMapBegin(TType& keyType, TType& valType, uint32_t& size) {
+    (void) keyType;
+    (void) valType;
+    (void) size;
     throw TProtocolException(TProtocolException::NOT_IMPLEMENTED,
                              "this protocol does not support reading (yet).");
   }
@@ -84,6 +94,8 @@
   }
 
   uint32_t readListBegin(TType& elemType, uint32_t& size) {
+    (void) elemType;
+    (void) size;
     throw TProtocolException(TProtocolException::NOT_IMPLEMENTED,
                              "this protocol does not support reading (yet).");
   }
@@ -94,6 +106,8 @@
   }
 
   uint32_t readSetBegin(TType& elemType, uint32_t& size) {
+    (void) elemType;
+    (void) size;
     throw TProtocolException(TProtocolException::NOT_IMPLEMENTED,
                              "this protocol does not support reading (yet).");
   }
@@ -104,46 +118,55 @@
   }
 
   uint32_t readBool(bool& value) {
+    (void) value;
     throw TProtocolException(TProtocolException::NOT_IMPLEMENTED,
                              "this protocol does not support reading (yet).");
   }
 
   uint32_t readBool(std::vector<bool>::reference value) {
+    (void) value;
     throw TProtocolException(TProtocolException::NOT_IMPLEMENTED,
                              "this protocol does not support reading (yet).");
   }
 
   uint32_t readByte(int8_t& byte) {
+    (void) byte;
     throw TProtocolException(TProtocolException::NOT_IMPLEMENTED,
                              "this protocol does not support reading (yet).");
   }
 
   uint32_t readI16(int16_t& i16) {
+    (void) i16;
     throw TProtocolException(TProtocolException::NOT_IMPLEMENTED,
                              "this protocol does not support reading (yet).");
   }
 
   uint32_t readI32(int32_t& i32) {
+    (void) i32;
     throw TProtocolException(TProtocolException::NOT_IMPLEMENTED,
                              "this protocol does not support reading (yet).");
   }
 
   uint32_t readI64(int64_t& i64) {
+    (void) i64;
     throw TProtocolException(TProtocolException::NOT_IMPLEMENTED,
                              "this protocol does not support reading (yet).");
   }
 
   uint32_t readDouble(double& dub) {
+    (void) dub;
     throw TProtocolException(TProtocolException::NOT_IMPLEMENTED,
                              "this protocol does not support reading (yet).");
   }
 
   uint32_t readString(std::string& str) {
+    (void) str;
     throw TProtocolException(TProtocolException::NOT_IMPLEMENTED,
                              "this protocol does not support reading (yet).");
   }
 
   uint32_t readBinary(std::string& str) {
+    (void) str;
     throw TProtocolException(TProtocolException::NOT_IMPLEMENTED,
                              "this protocol does not support reading (yet).");
   }
@@ -151,6 +174,9 @@
   uint32_t writeMessageBegin(const std::string& name,
                              const TMessageType messageType,
                              const int32_t seqid) {
+    (void) name;
+    (void) messageType;
+    (void) seqid;
     throw TProtocolException(TProtocolException::NOT_IMPLEMENTED,
                              "this protocol does not support writing (yet).");
   }
@@ -162,6 +188,7 @@
 
 
   uint32_t writeStructBegin(const char* name) {
+    (void) name;
     throw TProtocolException(TProtocolException::NOT_IMPLEMENTED,
                              "this protocol does not support writing (yet).");
   }
@@ -174,6 +201,9 @@
   uint32_t writeFieldBegin(const char* name,
                            const TType fieldType,
                            const int16_t fieldId) {
+    (void) name;
+    (void) fieldType;
+    (void) fieldId;
     throw TProtocolException(TProtocolException::NOT_IMPLEMENTED,
                              "this protocol does not support writing (yet).");
   }
@@ -191,6 +221,9 @@
   uint32_t writeMapBegin(const TType keyType,
                          const TType valType,
                          const uint32_t size) {
+    (void) keyType;
+    (void) valType;
+    (void) size;
     throw TProtocolException(TProtocolException::NOT_IMPLEMENTED,
                              "this protocol does not support writing (yet).");
   }
@@ -201,6 +234,8 @@
   }
 
   uint32_t writeListBegin(const TType elemType, const uint32_t size) {
+    (void) elemType;
+    (void) size;
     throw TProtocolException(TProtocolException::NOT_IMPLEMENTED,
                              "this protocol does not support writing (yet).");
   }
@@ -211,6 +246,8 @@
   }
 
   uint32_t writeSetBegin(const TType elemType, const uint32_t size) {
+    (void) elemType;
+    (void) size;
     throw TProtocolException(TProtocolException::NOT_IMPLEMENTED,
                              "this protocol does not support writing (yet).");
   }
@@ -221,41 +258,49 @@
   }
 
   uint32_t writeBool(const bool value) {
+    (void) value;
     throw TProtocolException(TProtocolException::NOT_IMPLEMENTED,
                              "this protocol does not support writing (yet).");
   }
 
   uint32_t writeByte(const int8_t byte) {
+    (void) byte;
     throw TProtocolException(TProtocolException::NOT_IMPLEMENTED,
                              "this protocol does not support writing (yet).");
   }
 
   uint32_t writeI16(const int16_t i16) {
+    (void) i16;
     throw TProtocolException(TProtocolException::NOT_IMPLEMENTED,
                              "this protocol does not support writing (yet).");
   }
 
   uint32_t writeI32(const int32_t i32) {
+    (void) i32;
     throw TProtocolException(TProtocolException::NOT_IMPLEMENTED,
                              "this protocol does not support writing (yet).");
   }
 
   uint32_t writeI64(const int64_t i64) {
+    (void) i64;
     throw TProtocolException(TProtocolException::NOT_IMPLEMENTED,
                              "this protocol does not support writing (yet).");
   }
 
   uint32_t writeDouble(const double dub) {
+    (void) dub;
     throw TProtocolException(TProtocolException::NOT_IMPLEMENTED,
                              "this protocol does not support writing (yet).");
   }
 
   uint32_t writeString(const std::string& str) {
+    (void) str;
     throw TProtocolException(TProtocolException::NOT_IMPLEMENTED,
                              "this protocol does not support writing (yet).");
   }
 
   uint32_t writeBinary(const std::string& str) {
+    (void) str;
     throw TProtocolException(TProtocolException::NOT_IMPLEMENTED,
                              "this protocol does not support writing (yet).");
   }