THRIFT-4732: windows cmake refinements and add windows docker build support
diff --git a/lib/cpp/src/thrift/TOutput.cpp b/lib/cpp/src/thrift/TOutput.cpp
index ae3a9e2..af36137 100644
--- a/lib/cpp/src/thrift/TOutput.cpp
+++ b/lib/cpp/src/thrift/TOutput.cpp
@@ -29,6 +29,8 @@
TOutput GlobalOutput;
+TOutput::TOutput() : f_(&errorTimeWrapper) {}
+
void TOutput::printf(const char* message, ...) {
#ifndef THRIFT_SQUELCH_CONSOLE_OUTPUT
// Try to reduce heap usage, even if printf is called rarely.
diff --git a/lib/cpp/src/thrift/TOutput.h b/lib/cpp/src/thrift/TOutput.h
index 1375f73..6135cfa 100644
--- a/lib/cpp/src/thrift/TOutput.h
+++ b/lib/cpp/src/thrift/TOutput.h
@@ -25,7 +25,7 @@
class TOutput {
public:
- TOutput() : f_(&errorTimeWrapper) {}
+ TOutput();
inline void setOutputFunction(void (*function)(const char*)) { f_ = function; }
diff --git a/lib/cpp/src/thrift/protocol/TJSONProtocol.cpp b/lib/cpp/src/thrift/protocol/TJSONProtocol.cpp
index 4576fa1..db407f2 100644
--- a/lib/cpp/src/thrift/protocol/TJSONProtocol.cpp
+++ b/lib/cpp/src/thrift/protocol/TJSONProtocol.cpp
@@ -898,7 +898,7 @@
}
try {
num = fromString<double>(str);
- } catch (std::runtime_error& e) {
+ } catch (const std::runtime_error&) {
throw TProtocolException(TProtocolException::INVALID_DATA,
"Expected numeric value; got \"" + str + "\"");
}
@@ -911,7 +911,7 @@
result += readJSONNumericChars(str);
try {
num = fromString<double>(str);
- } catch (std::runtime_error& e) {
+ } catch (const std::runtime_error&) {
throw TProtocolException(TProtocolException::INVALID_DATA,
"Expected numeric value; got \"" + str + "\"");
}