Remove unused variables
Jenkins presubmit fails for all commits right now due to certain unused
variables. This commit aims to pass presubmit without regressing
functionality.
Tested: Presubmit passes
Change-Id: Ifdc7081b1154ce3ac2f3ab0828429660db35360a
Signed-off-by: Edward Lee <edwarddl@google.com>
diff --git a/include/dbus/file_notifier.hpp b/include/dbus/file_notifier.hpp
index c887ab2..83c92f9 100644
--- a/include/dbus/file_notifier.hpp
+++ b/include/dbus/file_notifier.hpp
@@ -29,8 +29,7 @@
CperFileNotifier(sdbusplus::bus_t& bus, const std::string& filePath,
uint64_t entry) :
FileNotifierInterface(bus, generatePath(entry).c_str(),
- action::emit_no_signals),
- entry(entry), bus(bus)
+ action::emit_no_signals)
{
// We only need the interface added signal for the fault monitor. So
// stop emitting properties changed signal.
@@ -42,13 +41,6 @@
private:
/**
- * @brief DBus index of the entry.
- */
- uint64_t entry;
-
- sdbusplus::bus_t& bus;
-
- /**
* @brief Generate a path for the CperFileNotifier DBus object.
*
* @param[in] entry - unique index for the DBus object.
diff --git a/include/pci_handler.hpp b/include/pci_handler.hpp
index ae7bfdc..4ae1f85 100644
--- a/include/pci_handler.hpp
+++ b/include/pci_handler.hpp
@@ -29,7 +29,6 @@
uint32_t getMemoryRegionSize() override;
private:
- uint32_t regionAddress;
uint32_t regionSize;
std::unique_ptr<stdplus::fd::Fd> fd;
diff --git a/include/rde/external_storer_file.hpp b/include/rde/external_storer_file.hpp
index bb853f4..8eda3c6 100644
--- a/include/rde/external_storer_file.hpp
+++ b/include/rde/external_storer_file.hpp
@@ -89,7 +89,6 @@
bool publishJson(std::string_view jsonStr) override;
private:
- sdbusplus::bus_t& bus;
std::string rootPath;
std::unique_ptr<FileHandlerInterface> fileHandler;
std::string logServiceId;
diff --git a/src/pci_handler.cpp b/src/pci_handler.cpp
index b3e25bd..9ccb550 100644
--- a/src/pci_handler.cpp
+++ b/src/pci_handler.cpp
@@ -17,8 +17,8 @@
PciDataHandler::PciDataHandler(uint32_t regionAddress, size_t regionSize,
std::unique_ptr<stdplus::fd::Fd> fd) :
- regionAddress(regionAddress),
- regionSize(regionSize), fd(std::move(fd)),
+ regionSize(regionSize),
+ fd(std::move(fd)),
mmap(stdplus::fd::MMap(
*this->fd, regionSize, stdplus::fd::ProtFlags{PROT_READ | PROT_WRITE},
stdplus::fd::MMapFlags{stdplus::fd::MMapAccess::Shared}, regionAddress))
diff --git a/src/rde/external_storer_file.cpp b/src/rde/external_storer_file.cpp
index 26aa6d7..4e45993 100644
--- a/src/rde/external_storer_file.cpp
+++ b/src/rde/external_storer_file.cpp
@@ -46,8 +46,8 @@
ExternalStorerFileInterface::ExternalStorerFileInterface(
sdbusplus::bus_t& bus, std::string_view rootPath,
std::unique_ptr<FileHandlerInterface> fileHandler) :
- bus(bus),
- rootPath(rootPath), fileHandler(std::move(fileHandler)), logServiceId(""),
+ rootPath(rootPath),
+ fileHandler(std::move(fileHandler)), logServiceId(""),
cperNotifier(std::make_unique<CperFileNotifierHandler>(bus))
{}