THRIFT-916 Wall_Wextra_pedantic_Wno-long-long_Wno-variadic-macros_Wno-overflow_NOWARN...
authorRoger Meier <roger@apache.org>
Sat, 20 Nov 2010 06:48:47 +0000 (06:48 +0000)
committerRoger Meier <roger@apache.org>
Sat, 20 Nov 2010 06:48:47 +0000 (06:48 +0000)
git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1037127 13f79535-47bb-0310-9956-ffa450edef68

lib/cpp/src/transport/TFileTransport.cpp
lib/cpp/src/transport/THttpTransport.cpp

index 56b44f0..8b09ed9 100644 (file)
@@ -181,13 +181,13 @@ TFileTransport::~TFileTransport() {
 
 bool TFileTransport::initBufferAndWriteThread() {
   if (bufferAndThreadInitialized_) {
-    T_ERROR("Trying to double-init TFileTransport");
+    T_ERROR("%s", "Trying to double-init TFileTransport");
     return false;
   }
 
   if (writerThreadId_ == 0) {
     if (pthread_create(&writerThreadId_, NULL, startWriterThread, (void *)this) != 0) {
-      T_ERROR("Could not create writer thread");
+      T_ERROR("%s", "Could not create writer thread");
       return false;
     }
   }
@@ -220,7 +220,7 @@ void TFileTransport::enqueueEvent(const uint8_t* buf, uint32_t eventLen) {
   }
 
   if (eventLen == 0) {
-    T_ERROR("cannot enqueue an empty event");
+    T_ERROR("%s", "cannot enqueue an empty event");
     return;
   }
 
@@ -812,7 +812,7 @@ void TFileTransport::seekToChunk(int32_t chunk) {
 
   // too large a value for reverse seek, just seek to beginning
   if (chunk < 0) {
-    T_DEBUG("Incorrect value for reverse seek. Seeking to beginning...");
+    T_DEBUG("%s", "Incorrect value for reverse seek. Seeking to beginning...");
     chunk = 0;
   }
 
@@ -820,7 +820,7 @@ void TFileTransport::seekToChunk(int32_t chunk) {
   bool seekToEnd = false;
   off_t minEndOffset = 0;
   if (chunk >= numChunks) {
-    T_DEBUG("Trying to seek past EOF. Seeking to EOF instead...");
+    T_DEBUG("%s", "Trying to seek past EOF. Seeking to EOF instead...");
     seekToEnd = true;
     chunk = numChunks - 1;
     // this is the min offset to process events till
@@ -956,7 +956,7 @@ eventInfo* TFileTransportBuffer::getNext() {
 
 void TFileTransportBuffer::reset() {
   if (bufferMode_ == WRITE || writePoint_ > readPoint_) {
-    T_DEBUG("Resetting a buffer with unread entries");
+    T_DEBUG("%s", "Resetting a buffer with unread entries");
   }
   // Clean up the old entries
   for (uint32_t i = 0; i < writePoint_; i++) {
index 7733833..95fe207 100644 (file)
@@ -127,9 +127,9 @@ uint32_t THttpTransport::parseChunkSize(char* line) {
   if (semi != NULL) {
     *semi = '\0';
   }
-  int size = 0;
+  uint32_t size = 0;
   sscanf(line, "%x", &size);
-  return (uint32_t)size;
+  return size;
 }
 
 uint32_t THttpTransport::readContent(uint32_t size) {