From 68625e48b90e47f13766e2af893b840932ace0f6 Mon Sep 17 00:00:00 2001 From: ThorstenB Date: Mon, 2 Jan 2012 23:04:40 +0100 Subject: [PATCH] Fix compiler warning / test issue. --- simgear/props/propertyObject_test.cxx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/simgear/props/propertyObject_test.cxx b/simgear/props/propertyObject_test.cxx index 61a050c0..b366d27a 100644 --- a/simgear/props/propertyObject_test.cxx +++ b/simgear/props/propertyObject_test.cxx @@ -2,6 +2,12 @@ # include #endif +#ifdef NDEBUG +// Always enable DEBUG mode in test application, otherwise "assert" test +// statements have no effect and don't actually test anything (catch 17 ;-) ). +#undef NDEBUG +#endif + #include #include @@ -143,8 +149,9 @@ void testReadMissing() PropertyObject b("not/found/honest"); try { - bool v = b; + bool v = b; assert(false && "read of missing property didn't throw"); + (void) v; // don't warn about unused variable } catch (sg_exception& e) { // expected } -- 2.39.5