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/ThreadFactoryTests.h b/lib/cpp/test/concurrency/ThreadFactoryTests.h
index d7431a8..635c8a2 100644
--- a/lib/cpp/test/concurrency/ThreadFactoryTests.h
+++ b/lib/cpp/test/concurrency/ThreadFactoryTests.h
@@ -220,7 +220,7 @@
 
       try {
         monitor.wait(100);
-      } catch (TimedOutException& e) {
+      } catch (TimedOutException&) {
       }
 
       if (state == SynchStartTask::STARTED) {
@@ -257,7 +257,7 @@
         Synchronized s(monitor);
         try {
           monitor.wait(timeout);
-        } catch (TimedOutException& e) {
+        } catch (TimedOutException&) {
         }
       }
     }
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");
diff --git a/lib/cpp/test/concurrency/TimerManagerTests.h b/lib/cpp/test/concurrency/TimerManagerTests.h
index dda16ed..f4600fc 100644
--- a/lib/cpp/test/concurrency/TimerManagerTests.h
+++ b/lib/cpp/test/concurrency/TimerManagerTests.h
@@ -58,7 +58,7 @@
 
       delta = delta > _timeout ? delta - _timeout : _timeout - delta;
 
-      float error = delta / _timeout;
+      double error = double(delta) / _timeout;
 
       if (error < TEST_TOLERANCE) {
         _success = true;
@@ -119,7 +119,7 @@
           _monitor.wait(1000);
           assert(
               0 == "ERROR: This wait should time out. TimerManager dispatcher may have a problem.");
-        } catch (TimedOutException& ex) {
+        } catch (TimedOutException&) {
         }
 
         task.reset(new TimerManagerTests::Task(_monitor, timeout));