clang-tidy: Fix unused variable warnings
- Removed unused const variable 'IBMCFFPSInterface' in validator.cpp.
- Suppressed unused private field warning for 'systemBus' in
cold_redundancy.hpp.
-
Below error fixed:
'''
./tools/power-utils/validator.cpp:14:12: error:
unused variable 'IBMCFFPSInterface' [-Werror,-Wunused-const-variable]
14 | const auto IBMCFFPSInterface =
/cold-redundancy/cold_redundancy.hpp:67:51: error:
private field 'systemBus' is not used [-Werror,-Wunused-private-field]
67 | std::shared_ptr<sdbusplus::asio::connection>& systemBus;
power-sequencer/mihawk-cpld.hpp:109:23: error: private field 'bus' is not
used [clang-diagnostic-unused-private-field]
109 | sdbusplus::bus_t& bus;
'''
Change-Id: Ic194a58b646d469ff78fb5147290784fe4ed9480
Signed-off-by: Jayanth Othayoth <ojayanth@gmail.com>
diff --git a/cold-redundancy/cold_redundancy.hpp b/cold-redundancy/cold_redundancy.hpp
index 97db2c0..b91894d 100644
--- a/cold-redundancy/cold_redundancy.hpp
+++ b/cold-redundancy/cold_redundancy.hpp
@@ -64,7 +64,7 @@
/**
* @brief Indicates the dbus connction
*/
- std::shared_ptr<sdbusplus::asio::connection>& systemBus;
+ [[maybe_unused]] std::shared_ptr<sdbusplus::asio::connection>& systemBus;
/**
* @brief Indicates the D-Bus matches
diff --git a/power-sequencer/mihawk-cpld.hpp b/power-sequencer/mihawk-cpld.hpp
index cf554cc..bc12e9d 100644
--- a/power-sequencer/mihawk-cpld.hpp
+++ b/power-sequencer/mihawk-cpld.hpp
@@ -106,7 +106,7 @@
/**
* The D-Bus bus object
*/
- sdbusplus::bus_t& bus;
+ [[maybe_unused]] sdbusplus::bus_t& bus;
/**
* Open CPLD_register via i2c.
diff --git a/tools/power-utils/validator.cpp b/tools/power-utils/validator.cpp
index 7942be9..246da05 100644
--- a/tools/power-utils/validator.cpp
+++ b/tools/power-utils/validator.cpp
@@ -11,8 +11,6 @@
using namespace phosphor::power::util;
constexpr auto supportedConfIntf =
"xyz.openbmc_project.Configuration.SupportedConfiguration";
-const auto IBMCFFPSInterface =
- "xyz.openbmc_project.Configuration.IBMCFFPSConnector";
const auto objectPath = "/";
bool PSUUpdateValidator::areAllPsuSameModel()