diff --git a/dbus/dbushelper_interface.hpp b/dbus/dbushelper_interface.hpp
index 6d7e506..2ea6230 100644
--- a/dbus/dbushelper_interface.hpp
+++ b/dbus/dbushelper_interface.hpp
@@ -8,13 +8,13 @@
 
 struct SensorProperties
 {
-    int64_t scale;
-    double value;
-    double min;
-    double max;
+    int64_t scale = 0;
+    double value = 0.0;
+    double min = 0.0;
+    double max = 0.0;
     std::string unit;
-    bool available;
-    bool unavailableAsFailed;
+    bool available = false;
+    bool unavailableAsFailed = false;
 };
 
 class DbusHelperInterface
diff --git a/pid/ec/pid.hpp b/pid/ec/pid.hpp
index 9db08fd..bc81504 100644
--- a/pid/ec/pid.hpp
+++ b/pid/ec/pid.hpp
@@ -10,8 +10,8 @@
 
 typedef struct
 {
-    double min;
-    double max;
+    double min = 0.0;
+    double max = 0.0;
 } limits_t;
 
 /* Note: If you update these structs you need to update the copy code in
@@ -19,27 +19,27 @@
  */
 typedef struct
 {
-    bool initialized;          // has pid been initialized
-    bool checkHysterWithSetpt; // compare current input and setpoint to check
-                               // hysteresis
+    bool initialized = false;          // has pid been initialized
+    bool checkHysterWithSetpt = false; // compare current input and setpoint to
+                                       // check hysteresis
 
-    double ts;                 // sample time in seconds
-    double integral;           // integral of error
-    double lastOutput;         // value of last output
-    double lastError;          // value of last error
+    double ts = 0.0;                   // sample time in seconds
+    double integral = 0.0;             // integral of error
+    double lastOutput = 0.0;           // value of last output
+    double lastError = 0.0;            // value of last error
 
-    double proportionalCoeff;  // coeff for P
-    double integralCoeff;      // coeff for I
-    double derivativeCoeff;    // coeff for D
-    double feedFwdOffset;      // offset coeff for feed-forward term
-    double feedFwdGain;        // gain for feed-forward term
+    double proportionalCoeff = 0.0;    // coeff for P
+    double integralCoeff = 0.0;        // coeff for I
+    double derivativeCoeff = 0.0;      // coeff for D
+    double feedFwdOffset = 0.0;        // offset coeff for feed-forward term
+    double feedFwdGain = 0.0;          // gain for feed-forward term
 
-    limits_t integralLimit;    // clamp of integral
-    limits_t outLim;           // clamp of output
-    double slewNeg;
-    double slewPos;
-    double positiveHysteresis;
-    double negativeHysteresis;
+    limits_t integralLimit;            // clamp of integral
+    limits_t outLim;                   // clamp of output
+    double slewNeg = 0.0;
+    double slewPos = 0.0;
+    double positiveHysteresis = 0.0;
+    double negativeHysteresis = 0.0;
 } pid_info_t;
 
 double pid(pid_info_t* pidinfoptr, double input, double setpoint,
@@ -48,21 +48,21 @@
 /* Condensed version for use by the configuration. */
 struct pidinfo
 {
-    bool checkHysterWithSetpt;  // compare current input and setpoint to check
-                                // hysteresis
+    bool checkHysterWithSetpt = 0.0; // compare current input and setpoint to
+                                     // check hysteresis
 
-    double ts;                  // sample time in seconds
-    double proportionalCoeff;   // coeff for P
-    double integralCoeff;       // coeff for I
-    double derivativeCoeff;     // coeff for D
-    double feedFwdOffset;       // offset coeff for feed-forward term
-    double feedFwdGain;         // gain for feed-forward term
-    ec::limits_t integralLimit; // clamp of integral
-    ec::limits_t outLim;        // clamp of output
-    double slewNeg;
-    double slewPos;
-    double positiveHysteresis;
-    double negativeHysteresis;
+    double ts = 0.0;                 // sample time in seconds
+    double proportionalCoeff = 0.0;  // coeff for P
+    double integralCoeff = 0.0;      // coeff for I
+    double derivativeCoeff = 0.0;    // coeff for D
+    double feedFwdOffset = 0.0;      // offset coeff for feed-forward term
+    double feedFwdGain = 0.0;        // gain for feed-forward term
+    ec::limits_t integralLimit;      // clamp of integral
+    ec::limits_t outLim;             // clamp of output
+    double slewNeg = 0.0;
+    double slewPos = 0.0;
+    double positiveHysteresis = 0.0;
+    double negativeHysteresis = 0.0;
 };
 
 } // namespace ec
diff --git a/test/helpers.hpp b/test/helpers.hpp
index 4d3faea..c1715fe 100644
--- a/test/helpers.hpp
+++ b/test/helpers.hpp
@@ -42,12 +42,6 @@
                      const std::string& path, const std::string& intf,
                      const std::vector<std::string>& properties, double* index)
 {
-    EXPECT_CALL(*sdbus_mock,
-                sd_bus_add_object_vtable(IsNull(), NotNull(), StrEq(path),
-                                         StrEq(intf), NotNull(), NotNull()))
-        .Times(::testing::AnyNumber())
-        .WillOnce(Return(0));
-
     if (!defer)
     {
         EXPECT_CALL(*sdbus_mock,
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));
 
