THRIFT-3246 Reduce the number of trivial warnings in Windows C++ CMake builds
Client: cpp
Patch: Ben Craig <bencraig@apache.org>
This closes #553
diff --git a/lib/cpp/test/concurrency/ThreadManagerTests.h b/lib/cpp/test/concurrency/ThreadManagerTests.h
index 904948c..08e8179 100644
--- a/lib/cpp/test/concurrency/ThreadManagerTests.h
+++ b/lib/cpp/test/concurrency/ThreadManagerTests.h
@@ -56,7 +56,7 @@
try {
_sleep.wait(_timeout);
- } catch (TimedOutException& e) {
+ } catch (TimedOutException&) {
;
} catch (...) {
assert(0);
@@ -183,7 +183,7 @@
<< "ms min: " << minTime << "ms max: " << maxTime << "ms average: " << averageTime
<< "ms" << std::endl;
- double expectedTime = ((count + (workerCount - 1)) / workerCount) * timeout;
+ double expectedTime = (double(count + (workerCount - 1)) / workerCount) * timeout;
double error = ((time01 - time00) - expectedTime) / expectedTime;
@@ -290,18 +290,18 @@
try {
threadManager->add(extraTask, 1);
throw TException("Unexpected success adding task in excess of pending task count");
- } catch (TooManyPendingTasksException& e) {
+ } catch (TooManyPendingTasksException&) {
throw TException("Should have timed out adding task in excess of pending task count");
- } catch (TimedOutException& e) {
+ } catch (TimedOutException&) {
// Expected result
}
try {
threadManager->add(extraTask, -1);
throw TException("Unexpected success adding task in excess of pending task count");
- } catch (TimedOutException& e) {
+ } catch (TimedOutException&) {
throw TException("Unexpected timeout adding task in excess of pending task count");
- } catch (TooManyPendingTasksException& e) {
+ } catch (TooManyPendingTasksException&) {
// Expected result
}
@@ -327,12 +327,12 @@
try {
threadManager->add(extraTask, 1);
- } catch (TimedOutException& e) {
+ } catch (TimedOutException&) {
std::cout << "\t\t\t"
<< "add timed out unexpectedly" << std::endl;
throw TException("Unexpected timeout adding task");
- } catch (TooManyPendingTasksException& e) {
+ } catch (TooManyPendingTasksException&) {
std::cout << "\t\t\t"
<< "add encountered too many pending exepctions" << std::endl;
throw TException("Unexpected timeout adding task");