test/watchdog: Don't use designated initializers
gcc supported this in c++ even though it was non-standard until c++2a is
complete. This change removes designated initializers to make our tests
compliant with std++17.
Tested:
Built and run through unit tests.
Change-Id: I846394c633c0396518db6ed41682bbcf05b890c6
Signed-off-by: William A. Kennington III <wak@google.com>
diff --git a/test/watchdog.cpp b/test/watchdog.cpp
index 66cca7e..fd8988f 100644
--- a/test/watchdog.cpp
+++ b/test/watchdog.cpp
@@ -214,10 +214,10 @@
// We need to make a wdog with the right fallback options
// The interval is set to be noticeably different from the default
// so we can always tell the difference
- Watchdog::Fallback fallback{
- .action = Watchdog::Action::PowerOff,
- .interval = static_cast<uint64_t>(fallbackIntervalMs),
- };
+ Watchdog::Fallback fallback;
+ fallback.action = Watchdog::Action::PowerOff;
+ fallback.interval = static_cast<uint64_t>(fallbackIntervalMs);
+ fallback.always = false;
wdog = std::make_unique<Watchdog>(bus, TEST_PATH, event,
Watchdog::ActionTargetMap(),
std::move(fallback));
@@ -296,11 +296,10 @@
// We need to make a wdog with the right fallback options
// The interval is set to be noticeably different from the default
// so we can always tell the difference
- Watchdog::Fallback fallback{
- .action = Watchdog::Action::PowerOff,
- .interval = static_cast<uint64_t>(fallbackIntervalMs),
- .always = false,
- };
+ Watchdog::Fallback fallback;
+ fallback.action = Watchdog::Action::PowerOff;
+ fallback.interval = static_cast<uint64_t>(fallbackIntervalMs);
+ fallback.always = false;
wdog = std::make_unique<Watchdog>(bus, TEST_PATH, event,
Watchdog::ActionTargetMap(),
std::move(fallback));
@@ -350,11 +349,10 @@
// We need to make a wdog with the right fallback options
// The interval is set to be noticeably different from the default
// so we can always tell the difference
- Watchdog::Fallback fallback{
- .action = Watchdog::Action::PowerOff,
- .interval = static_cast<uint64_t>(fallbackIntervalMs),
- .always = true,
- };
+ Watchdog::Fallback fallback;
+ fallback.action = Watchdog::Action::PowerOff;
+ fallback.interval = static_cast<uint64_t>(fallbackIntervalMs);
+ fallback.always = true;
wdog = std::make_unique<Watchdog>(bus, TEST_PATH, event,
Watchdog::ActionTargetMap(),
std::move(fallback));