From: Thomas Markwalder Date: Tue, 1 Jul 2014 11:19:01 +0000 (-0400) Subject: [master] Fix empty-bodied loop warning in asiolink unit test X-Git-Tag: trac3473_base~9^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=af983cded90a869dbfba77ba8a6d1bfe159028ed;p=thirdparty%2Fkea.git [master] Fix empty-bodied loop warning in asiolink unit test Fixed Mac OS-X/gcc 4.2.1 issued warning on empty bodied while-loops in new asiolink::IntervalTimer unit tests. --- diff --git a/src/lib/asiolink/tests/interval_timer_unittest.cc b/src/lib/asiolink/tests/interval_timer_unittest.cc index b47b40382f..2c569b8891 100644 --- a/src/lib/asiolink/tests/interval_timer_unittest.cc +++ b/src/lib/asiolink/tests/interval_timer_unittest.cc @@ -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);