openpower-pels: clean up various compile warnings
Compile warnings observed when compiling parts of the
openpower-pels (or corresponding tests) under stricter
compiler warning flags of Meson.
Issues fixed:
- many unused parameters
- invalid case fall-through
- excess semi-colons
- incorrect 'const' on return-by-value type
- removal of variable length array in test case
- uncaught return from 'system' call in test case
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: I8af69184042cf8661d1307a02ecf3afcab4724a1
diff --git a/extensions/openpower-pels/manager.cpp b/extensions/openpower-pels/manager.cpp
index e50d627..ef7c789 100644
--- a/extensions/openpower-pels/manager.cpp
+++ b/extensions/openpower-pels/manager.cpp
@@ -257,7 +257,7 @@
_repo.remove(id);
}
-bool Manager::isDeleteProhibited(uint32_t obmcLogID)
+bool Manager::isDeleteProhibited(uint32_t /*obmcLogID*/)
{
return false;
}
@@ -298,7 +298,7 @@
uint64_t timestamp,
phosphor::logging::Entry::Level severity,
const std::vector<std::string>& additionalData,
- const std::vector<std::string>& associations,
+ const std::vector<std::string>& /*associations*/,
const FFDCEntries& ffdc)
{
auto entry = _registry.lookup(message, rg::LookupType::name);
@@ -392,7 +392,7 @@
std::placeholders::_1));
}
-void Manager::closeFD(int fd, sdeventplus::source::EventBase& source)
+void Manager::closeFD(int fd, sdeventplus::source::EventBase& /*source*/)
{
close(fd);
_fdCloserEventSource.reset();
@@ -475,7 +475,7 @@
std::placeholders::_1));
}
-void Manager::pruneRepo(sdeventplus::source::EventBase& source)
+void Manager::pruneRepo(sdeventplus::source::EventBase& /*source*/)
{
auto idsToDelete = _repo.prune();
@@ -516,7 +516,7 @@
std::placeholders::_3));
}
-void Manager::pelFileDeleted(sdeventplus::source::IO& io, int fd,
+void Manager::pelFileDeleted(sdeventplus::source::IO& /*io*/, int /*fd*/,
uint32_t revents)
{
if (!(revents & EPOLLIN))