test: signalqueue: add explicit cast to bool
React to a GCC7.2 behavioral differences where
assert(sdbusplus::message::message) no longer compiles.
sdbusplus::message::message implements operator bool which
prior to GCC7.2 was emitted implicitly. Add an explicit
cast to bool where required.
Tested: Built repository using GCC 7.2
Change-Id: I49fb05d616ba1f790ef68365983b1f85aa91e46a
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
diff --git a/test/test.cpp b/test/test.cpp
index 849b60b..5d89f0d 100644
--- a/test/test.cpp
+++ b/test/test.cpp
@@ -244,7 +244,7 @@
b.call(m);
auto sig{queue.pop()};
- assert(sig);
+ assert(static_cast<bool>(sig));
sdbusplus::message::object_path signalPath;
Object signalObjectType;
sig.read(signalPath);
@@ -317,7 +317,7 @@
{
std::vector<std::string> interfaces;
auto sig{queue.pop()};
- assert(sig);
+ assert(static_cast<bool>(sig));
sig.read(sigpath);
assert(sigpath == deleteMeThree);
sig.read(interfaces);
@@ -386,7 +386,7 @@
{
std::vector<std::string> interfaces;
auto sig{queue.pop()};
- assert(sig);
+ assert(static_cast<bool>(sig));
sig.read(sigpath);
assert(sigpath == deleteMeOne);
sig.read(interfaces);
@@ -396,7 +396,7 @@
{
std::vector<std::string> interfaces;
auto sig{queue.pop()};
- assert(sig);
+ assert(static_cast<bool>(sig));
sig.read(sigpath);
assert(sigpath == deleteMeTwo);
sig.read(interfaces);
@@ -424,7 +424,7 @@
{
std::vector<std::string> interfaces;
auto sig{queue.pop()};
- assert(sig);
+ assert(static_cast<bool>(sig));
sig.read(sigpath);
assert(sigpath == deleteMeThree);
sig.read(interfaces);
@@ -498,14 +498,14 @@
b.call(m);
{
auto sig{queue.pop()};
- assert(sig);
+ assert(static_cast<bool>(sig));
sig.read(signalPath);
assert(createMe1 == signalPath.str);
sig.read(signalObject);
}
{
auto sig{queue.pop()};
- assert(sig);
+ assert(static_cast<bool>(sig));
sig.read(signalPath);
assert(createMe2 == signalPath.str);
sig.read(signalObject);