Remove unused variables
cppcheck flags style warnings to indicate when we declare a variable and
never use it. Its effective dead code, this patch aims at fixing all the
[unusedVariable] warnings reported by the openbmc repo-ci.
Change-Id: Ie51176c6b2ced7251b467b2d456e9f3088637121
Signed-off-by: Manojkiran Eda <manojkiran.eda@gmail.com>
diff --git a/oem/ibm/test/libpldmresponder_oem_platform_test.cpp b/oem/ibm/test/libpldmresponder_oem_platform_test.cpp
index 55768d5..db5283d 100644
--- a/oem/ibm/test/libpldmresponder_oem_platform_test.cpp
+++ b/oem/ibm/test/libpldmresponder_oem_platform_test.cpp
@@ -187,7 +187,6 @@
{
auto inPDRRepo = pldm_pdr_init();
sdbusplus::bus_t bus(sdbusplus::bus::new_default());
- std::filesystem::path dbPath;
TestInstanceIdDb instanceIdDb;
auto mockDbusHandler = std::make_unique<MockdBusHandler>();
auto event = sdeventplus::Event::get_default();
@@ -293,7 +292,6 @@
{
auto inPDRRepo = pldm_pdr_init();
sdbusplus::bus_t bus(sdbusplus::bus::new_default());
- std::filesystem::path dbPath;
TestInstanceIdDb instanceIdDb;
auto mockDbusHandler = std::make_unique<MockdBusHandler>();
diff --git a/pldmtool/pldm_platform_cmd.cpp b/pldmtool/pldm_platform_cmd.cpp
index e4d2a7c..d14720f 100644
--- a/pldmtool/pldm_platform_cmd.cpp
+++ b/pldmtool/pldm_platform_cmd.cpp
@@ -673,7 +673,6 @@
const std::vector<uint8_t>& value)
{
std::vector<std::string> data{};
- std::map<uint8_t, std::string> stateNameMaps;
for (const auto& s : value)
{