summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorChris Wilson <chris+github@qwirx.com>2017-10-12 21:27:54 +0100
committerChris Wilson <chris+github@qwirx.com>2017-10-16 22:02:32 +0100
commita631c82882b039f8467a2ef9abeb343f2ec5b3da (patch)
treeb0ae4a2304e386aef4ef031b9d565116e0fa7f02 /test
parentfea4efbf5648dddb63f51b4b076baceb872be87b (diff)
Fix -Wundefined-bool-conversion compile failure of master branch
Master build fails with: lib/common/Timer.cpp:171:10: error: reference cannot be bound to dereferenced null pointer in well-defined C++ code; pointer may be assumed to always convert to true [-Werror,-Wundefined-bool-conversion]. Cannot get regtests to pass on this feature branch without fixing this. Also remove unused code from Timers.
Diffstat (limited to 'test')
-rw-r--r--test/common/testcommon.cpp10
1 files changed, 2 insertions, 8 deletions
diff --git a/test/common/testcommon.cpp b/test/common/testcommon.cpp
index bd75ac37..bcfc92e1 100644
--- a/test/common/testcommon.cpp
+++ b/test/common/testcommon.cpp
@@ -312,14 +312,8 @@ int test(int argc, const char *argv[])
// Check that using timer methods without initialisation
// throws an assertion failure. Can only do this in debug mode
#ifndef BOX_RELEASE_BUILD
- TEST_CHECK_THROWS(Timers::Add(*(Timer*)NULL),
- CommonException, AssertFailed);
- TEST_CHECK_THROWS(Timers::Remove(*(Timer*)NULL),
- CommonException, AssertFailed);
- #endif
-
- // TEST_CHECK_THROWS(Timers::Signal(), CommonException, AssertFailed);
- #ifndef BOX_RELEASE_BUILD
+ TEST_CHECK_THROWS(Timer t1(900, "t1"), CommonException,
+ AssertFailed);
TEST_CHECK_THROWS(Timers::Cleanup(), CommonException,
AssertFailed);
#endif