summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorKonrad Grochowski <hcorg@apache.org>2014-11-06 19:32:59 +0100
committerKonrad Grochowski <hcorg@apache.org>2014-11-06 19:32:59 +0100
commitb3f5ffc42d4c52e4a76ff429411164d27fb65b22 (patch)
treec52d420b92e59bdd9e2b1cce94f5f808cc7283f7 /lib
parentcc092b37c8665384f2f7cb60d184a44f59ac3ba3 (diff)
downloadthrift-b3f5ffc42d4c52e4a76ff429411164d27fb65b22.tar.gz
THRIFT-2801: cpp - compilation warnings removed from test suite
Client: C++ Patch: Konrad Grochowski Unused parameters mostly
Diffstat (limited to 'lib')
-rw-r--r--lib/cpp/test/OpenSSLManualInitTest.cpp2
-rwxr-xr-xlib/cpp/test/TransportTest.cpp2
-rw-r--r--lib/cpp/test/ZlibTest.cpp2
-rw-r--r--lib/cpp/test/processor/Handlers.h5
-rw-r--r--lib/cpp/test/processor/ProcessorTest.cpp7
-rw-r--r--lib/cpp/test/processor/ServerThread.h2
6 files changed, 15 insertions, 5 deletions
diff --git a/lib/cpp/test/OpenSSLManualInitTest.cpp b/lib/cpp/test/OpenSSLManualInitTest.cpp
index c403b1871..fbecbc385 100644
--- a/lib/cpp/test/OpenSSLManualInitTest.cpp
+++ b/lib/cpp/test/OpenSSLManualInitTest.cpp
@@ -67,6 +67,8 @@ void test_openssl_availability() {
}
boost::unit_test::test_suite* init_unit_test_suite(int argc, char* argv[]) {
+ THRIFT_UNUSED_VARIABLE(argc);
+ THRIFT_UNUSED_VARIABLE(argv);
boost::unit_test::test_suite* suite =
&boost::unit_test::framework::master_test_suite();
suite->p_name.value = "OpenSSLManualInit";
diff --git a/lib/cpp/test/TransportTest.cpp b/lib/cpp/test/TransportTest.cpp
index 78c276474..c1cb97647 100755
--- a/lib/cpp/test/TransportTest.cpp
+++ b/lib/cpp/test/TransportTest.cpp
@@ -1046,6 +1046,8 @@ struct global_fixture {
BOOST_GLOBAL_FIXTURE(global_fixture)
boost::unit_test::test_suite* init_unit_test_suite(int argc, char* argv[]) {
+ THRIFT_UNUSED_VARIABLE(argc);
+ THRIFT_UNUSED_VARIABLE(argv);
struct timeval tv;
THRIFT_GETTIMEOFDAY(&tv, NULL);
int seed = tv.tv_sec ^ tv.tv_usec;
diff --git a/lib/cpp/test/ZlibTest.cpp b/lib/cpp/test/ZlibTest.cpp
index 1e8b6467a..49c551475 100644
--- a/lib/cpp/test/ZlibTest.cpp
+++ b/lib/cpp/test/ZlibTest.cpp
@@ -386,6 +386,8 @@ void print_usage(FILE* f, const char* argv0) {
}
boost::unit_test::test_suite* init_unit_test_suite(int argc, char* argv[]) {
+ THRIFT_UNUSED_VARIABLE(argc);
+ THRIFT_UNUSED_VARIABLE(argv);
uint32_t seed = static_cast<uint32_t>(time(NULL));
printf("seed: %" PRIu32 "\n", seed);
rng.seed(seed);
diff --git a/lib/cpp/test/processor/Handlers.h b/lib/cpp/test/processor/Handlers.h
index 2be262af8..75f43490c 100644
--- a/lib/cpp/test/processor/Handlers.h
+++ b/lib/cpp/test/processor/Handlers.h
@@ -244,6 +244,9 @@ class ServerEventHandler : public server::TServerEventHandler {
#if 0
ConnContext* context = reinterpret_cast<ConnContext*>(serverContext);
log_->append(EventLog::ET_PROCESS, context->id, 0);
+#else
+ THRIFT_UNUSED_VARIABLE(serverContext);
+ THRIFT_UNUSED_VARIABLE(transport);
#endif
}
@@ -285,6 +288,7 @@ class ProcessorEventHandler : public TProcessorEventHandler {
}
void postRead(void* ctx, const char* fnName, uint32_t bytes) {
+ THRIFT_UNUSED_VARIABLE(bytes);
CallContext* context = reinterpret_cast<CallContext*>(ctx);
checkName(context, fnName);
log_->append(EventLog::ET_POST_READ, context->connContext->id, context->id,
@@ -299,6 +303,7 @@ class ProcessorEventHandler : public TProcessorEventHandler {
}
void postWrite(void* ctx, const char* fnName, uint32_t bytes) {
+ THRIFT_UNUSED_VARIABLE(bytes);
CallContext* context = reinterpret_cast<CallContext*>(ctx);
checkName(context, fnName);
log_->append(EventLog::ET_POST_WRITE, context->connContext->id,
diff --git a/lib/cpp/test/processor/ProcessorTest.cpp b/lib/cpp/test/processor/ProcessorTest.cpp
index 0283d20a5..8b806b4de 100644
--- a/lib/cpp/test/processor/ProcessorTest.cpp
+++ b/lib/cpp/test/processor/ProcessorTest.cpp
@@ -932,10 +932,9 @@ DEFINE_NOFRAME_TESTS(TSimpleServer, Untemplated)
// TODO: We should test TEventServer in the future.
// For now, it is known not to work correctly with TProcessorEventHandler.
-
unit_test::test_suite* init_unit_test_suite(int argc, char* argv[]) {
- unit_test::framework::master_test_suite().p_name.value =
- "ProcessorTest";
-
+ THRIFT_UNUSED_VARIABLE(argc);
+ THRIFT_UNUSED_VARIABLE(argv);
+ unit_test::framework::master_test_suite().p_name.value = "ProcessorTest";
return NULL;
}
diff --git a/lib/cpp/test/processor/ServerThread.h b/lib/cpp/test/processor/ServerThread.h
index 0dd512797..f7fa0d5fb 100644
--- a/lib/cpp/test/processor/ServerThread.h
+++ b/lib/cpp/test/processor/ServerThread.h
@@ -61,7 +61,7 @@ class ServerState {
* Subclasses may override this method if they wish to record the final
* port that was used for the server.
*/
- virtual void bindSuccessful(uint16_t port) {
+ virtual void bindSuccessful(uint16_t /*port*/) {
}
};