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