THRIFT-916 no errors on GNU/Linux when compiling with CXXFLAGS="-Wall -Wextra -pedantic"
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@1022220 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/lib/cpp/test/TransportTest.cpp b/lib/cpp/test/TransportTest.cpp
index dceb708..59f2427 100644
--- a/lib/cpp/test/TransportTest.cpp
+++ b/lib/cpp/test/TransportTest.cpp
@@ -360,8 +360,9 @@
set_alarm();
// Write some data to the transport to hopefully unblock it.
- uint8_t buf[info->writeLength];
+ uint8_t* buf = new uint8_t[info->writeLength];
memset(buf, 'b', info->writeLength);
+ boost::scoped_array<uint8_t> array(buf);
info->transport->write(buf, info->writeLength);
info->transport->flush();
@@ -895,7 +896,7 @@
boost::unit_test::test_case* tc =
boost::unit_test::make_test_case(test_func, name.str());
suite_->add(tc, expectedFailures);
- };
+ }
template <class CoupledTransports>
void addTestBlocking(const char* transportName,