From d3bfe700308fa00eeed4bfa9cd76283c194c2d4a Mon Sep 17 00:00:00 2001 From: Roger Meier Date: Sat, 20 Nov 2010 06:48:47 +0000 Subject: [PATCH] THRIFT-916 Wall_Wextra_pedantic_Wno-long-long_Wno-variadic-macros_Wno-overflow_NOWARNINGS_DebianLenny.patch applied git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1037127 13f79535-47bb-0310-9956-ffa450edef68 --- lib/cpp/src/transport/TFileTransport.cpp | 12 ++++++------ lib/cpp/src/transport/THttpTransport.cpp | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/lib/cpp/src/transport/TFileTransport.cpp b/lib/cpp/src/transport/TFileTransport.cpp index 56b44f0c..8b09ed99 100644 --- a/lib/cpp/src/transport/TFileTransport.cpp +++ b/lib/cpp/src/transport/TFileTransport.cpp @@ -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++) { diff --git a/lib/cpp/src/transport/THttpTransport.cpp b/lib/cpp/src/transport/THttpTransport.cpp index 7733833b..95fe207a 100644 --- a/lib/cpp/src/transport/THttpTransport.cpp +++ b/lib/cpp/src/transport/THttpTransport.cpp @@ -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) { -- 2.17.1