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/TBufferBaseTest.cpp b/lib/cpp/test/TBufferBaseTest.cpp
index 21f4747..6e1bf16 100644
--- a/lib/cpp/test/TBufferBaseTest.cpp
+++ b/lib/cpp/test/TBufferBaseTest.cpp
@@ -172,7 +172,7 @@
}
-BOOST_AUTO_TEST_SUITE( TBufferBaseTest );
+BOOST_AUTO_TEST_SUITE( TBufferBaseTest )
BOOST_AUTO_TEST_CASE( test_MemoryBuffer_Write_GetBuffer ) {
init_data();
@@ -641,4 +641,5 @@
BOOST_CHECK_EQUAL(buffer->getBufferAsString(), output2);
}
-BOOST_AUTO_TEST_SUITE_END();
+BOOST_AUTO_TEST_SUITE_END()
+
diff --git a/lib/cpp/test/TMemoryBufferTest.cpp b/lib/cpp/test/TMemoryBufferTest.cpp
index 3dc19f8..3711970 100644
--- a/lib/cpp/test/TMemoryBufferTest.cpp
+++ b/lib/cpp/test/TMemoryBufferTest.cpp
@@ -25,7 +25,7 @@
#include <protocol/TBinaryProtocol.h>
#include "gen-cpp/ThriftTest_types.h"
-BOOST_AUTO_TEST_SUITE( TMemoryBufferTest );
+BOOST_AUTO_TEST_SUITE( TMemoryBufferTest )
BOOST_AUTO_TEST_CASE( test_roundtrip ) {
using apache::thrift::transport::TMemoryBuffer;
@@ -104,4 +104,5 @@
}
}
-BOOST_AUTO_TEST_SUITE_END();
+BOOST_AUTO_TEST_SUITE_END()
+
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,