diff options
| author | Brad Bishop <bradleyb@fuzziesquirrel.com> | 2018-02-21 13:24:41 -0500 |
|---|---|---|
| committer | Brad Bishop <bradleyb@fuzziesquirrel.com> | 2018-02-21 20:42:33 -0500 |
| commit | 6211a430c196bcecbefb9bf52ab99e372e6006a8 (patch) | |
| tree | 2939c52d8d54143b744511dffda5f7dcd59a702b /test | |
| parent | 33e217952d5791580b4d1d711da1d6010731fbca (diff) | |
| download | phosphor-inventory-manager-6211a430c196bcecbefb9bf52ab99e372e6006a8.tar.gz phosphor-inventory-manager-6211a430c196bcecbefb9bf52ab99e372e6006a8.zip | |
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>
Diffstat (limited to 'test')
| -rw-r--r-- | test/test.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
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 @@ void runTests() 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 @@ void runTests() { 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 @@ void runTests() { 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 @@ void runTests() { 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 @@ void runTests() { 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 @@ void runTests() 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); |

