fix CI failed
- Refs about removing add_object_vtable:
https://gerrit.openbmc.org/c/openbmc/phosphor-hwmon/+/73009
- initial some struct data
Signed-off-by: Harvey Wu <Harvey.Wu@quantatw.com>
Change-Id: Iacc62eb1b8cd2b1e092efdbcb3abafb8afb896c7
diff --git a/test/pid_zone_unittest.cpp b/test/pid_zone_unittest.cpp
index 3e8077c..b494896 100644
--- a/test/pid_zone_unittest.cpp
+++ b/test/pid_zone_unittest.cpp
@@ -76,13 +76,6 @@
SetupDbusObject(&sdbus_mock_enable, defer, pidsensorpath.c_str(),
enableInterface, propertiesenable, &de);
- EXPECT_CALL(sdbus_mock_enable,
- sd_bus_add_object_vtable(
- IsNull(), NotNull(), StrEq(pidsensorpath.c_str()),
- StrEq(debugThermalPowerInterface), NotNull(), NotNull()))
- .Times(::testing::AnyNumber())
- .WillOnce(Return(0));
-
DbusPidZone p(zone, minThermalOutput, failSafePercent, cycleTime, m,
bus_mock_mode, objPath, defer, accSetPoint);
// Success.
@@ -119,13 +112,6 @@
SetupDbusObject(&sdbus_mock_enable, defer, pidsensorpath.c_str(),
enableInterface, propertiesenable,
&propertyenable_index);
- EXPECT_CALL(sdbus_mock_enable,
- sd_bus_add_object_vtable(IsNull(), NotNull(),
- StrEq(pidsensorpath.c_str()),
- StrEq(debugThermalPowerInterface),
- NotNull(), NotNull()))
- .Times(::testing::AnyNumber())
- .WillOnce(Return(0));
zone = std::make_unique<DbusPidZone>(
zoneId, minThermalOutput, failSafePercent, cycleTime, mgr,
@@ -210,8 +196,7 @@
// Access the internal pid configuration to clear it out (unrelated to the
// test).
- ec::pid_info_t* info = tpid->getPIDInfo();
- std::memset(info, 0x00, sizeof(ec::pid_info_t));
+ [[maybe_unused]] ec::pid_info_t* info = tpid->getPIDInfo();
zone->addFanPID(std::move(tpid));
@@ -757,8 +742,7 @@
// Access the internal pid configuration to clear it out (unrelated to the
// test).
- ec::pid_info_t* info = tpid->getPIDInfo();
- std::memset(info, 0x00, sizeof(ec::pid_info_t));
+ [[maybe_unused]] ec::pid_info_t* info = tpid->getPIDInfo();
zone->addThermalPID(std::move(tpid));
@@ -782,8 +766,7 @@
// Access the internal pid configuration to clear it out (unrelated to the
// test).
- ec::pid_info_t* info = tpid->getPIDInfo();
- std::memset(info, 0x00, sizeof(ec::pid_info_t));
+ [[maybe_unused]] ec::pid_info_t* info = tpid->getPIDInfo();
zone->addFanPID(std::move(tpid));