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
diff --git a/lib/cpp/src/transport/TFileTransport.cpp b/lib/cpp/src/transport/TFileTransport.cpp
index 56b44f0..8b09ed9 100644
--- a/lib/cpp/src/transport/TFileTransport.cpp
+++ b/lib/cpp/src/transport/TFileTransport.cpp
@@ -181,13 +181,13 @@
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 @@
}
if (eventLen == 0) {
- T_ERROR("cannot enqueue an empty event");
+ T_ERROR("%s", "cannot enqueue an empty event");
return;
}
@@ -812,7 +812,7 @@
// 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 @@
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 @@
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 7733833..95fe207 100644
--- a/lib/cpp/src/transport/THttpTransport.cpp
+++ b/lib/cpp/src/transport/THttpTransport.cpp
@@ -127,9 +127,9 @@
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) {