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/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.