Author: roger
Date: Sat Nov 20 06:48:47 2010
New Revision: 1037127
URL: http://svn.apache.org/viewvc?rev=1037127&view=rev
Log:
THRIFT-916
Wall_Wextra_pedantic_Wno-long-long_Wno-variadic-macros_Wno-overflow_NOWARNINGS_DebianLenny.patch
applied
Modified:
thrift/trunk/lib/cpp/src/transport/TFileTransport.cpp
thrift/trunk/lib/cpp/src/transport/THttpTransport.cpp
Modified: thrift/trunk/lib/cpp/src/transport/TFileTransport.cpp
URL:
http://svn.apache.org/viewvc/thrift/trunk/lib/cpp/src/transport/TFileTransport.cpp?rev=1037127&r1=1037126&r2=1037127&view=diff
==============================================================================
--- thrift/trunk/lib/cpp/src/transport/TFileTransport.cpp (original)
+++ thrift/trunk/lib/cpp/src/transport/TFileTransport.cpp Sat Nov 20 06:48:47
2010
@@ -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
}
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
// 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
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++) {
Modified: thrift/trunk/lib/cpp/src/transport/THttpTransport.cpp
URL:
http://svn.apache.org/viewvc/thrift/trunk/lib/cpp/src/transport/THttpTransport.cpp?rev=1037127&r1=1037126&r2=1037127&view=diff
==============================================================================
--- thrift/trunk/lib/cpp/src/transport/THttpTransport.cpp (original)
+++ thrift/trunk/lib/cpp/src/transport/THttpTransport.cpp Sat Nov 20 06:48:47
2010
@@ -127,9 +127,9 @@ uint32_t THttpTransport::parseChunkSize(
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) {