]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[master] Fix empty-bodied loop warning in asiolink unit test
authorThomas Markwalder <tmark@isc.org>
Tue, 1 Jul 2014 11:19:01 +0000 (07:19 -0400)
committerThomas Markwalder <tmark@isc.org>
Tue, 1 Jul 2014 11:19:01 +0000 (07:19 -0400)
Fixed Mac OS-X/gcc 4.2.1 issued warning on empty bodied
while-loops in new asiolink::IntervalTimer unit tests.

src/lib/asiolink/tests/interval_timer_unittest.cc

index b47b40382f1097c6739e4410fdbbd7b2708ec30a..2c569b8891d7d40a7b5dbf68f025570b4a9ef247 100644 (file)
@@ -324,7 +324,9 @@ TEST_F(IntervalTimerTest, intervalModeTest) {
     // work or the the service has been stopped by the test timer.
     int cnt = 0;
     while (((cnt = io_service_.get_io_service().run_one()) > 0)
-           && (repeater_count < 5));
+           && (repeater_count < 5)) {
+        // deliberately empty
+    };
 
     // If cnt is zero, then something went wrong.
     EXPECT_TRUE(cnt > 0);
@@ -372,7 +374,9 @@ TEST_F(IntervalTimerTest, timerReuseTest) {
     // work or the the service has been stopped by the test timer.
     int cnt = 0;
     while ((cnt = io_service_.get_io_service().run_one())
-            && (one_shot_count < 4));
+            && (one_shot_count < 4)) {
+        // deliberately empty
+    };
 
     // If cnt is zero, then something went wrong.
     EXPECT_TRUE(cnt > 0);