diff --git a/include/mdrv2.hpp b/include/mdrv2.hpp
index e53545f..65890ed 100644
--- a/include/mdrv2.hpp
+++ b/include/mdrv2.hpp
@@ -75,7 +75,7 @@
           boost::asio::io_context& io) :
         sdbusplus::server::object_t<
             sdbusplus::server::xyz::openbmc_project::smbios::MDRV2>(bus, path),
-        bus(bus), timer(io), smbiosInterface(getObjectServer().add_interface(
+        timer(io), bus(bus), smbiosInterface(getObjectServer().add_interface(
                                  smbiosPath, smbiosInterfaceName))
     {
         smbiosDir.agentVersion = smbiosAgentVersion;
@@ -143,9 +143,9 @@
     inline uint8_t smbiosValidFlag(uint8_t index);
     void systemInfoUpdate(void);
 
-    int getTotalCpuSlot(void);
-    int getTotalDimmSlot(void);
-    int getTotalPcieSlot(void);
+    std::optional<size_t> getTotalCpuSlot(void);
+    std::optional<size_t> getTotalDimmSlot(void);
+    std::optional<size_t> getTotalPcieSlot(void);
     std::vector<std::unique_ptr<Cpu>> cpus;
     std::vector<std::unique_ptr<Dimm>> dimms;
     std::vector<std::unique_ptr<Pcie>> pcies;
diff --git a/include/system.hpp b/include/system.hpp
index 992408e..4753a01 100644
--- a/include/system.hpp
+++ b/include/system.hpp
@@ -45,11 +45,10 @@
         sdbusplus::server::object_t<
             sdbusplus::server::xyz::openbmc_project::common::UUID>(
             bus, objPath.c_str()),
-        bus(bus),
         sdbusplus::server::object_t<sdbusplus::server::xyz::openbmc_project::
                                         inventory::decorator::Revision>(
             bus, objPath.c_str()),
-        path(objPath), storage(smbiosTableStorage)
+        bus(bus), path(objPath), storage(smbiosTableStorage)
     {
         std::string input = "0";
         uuid(input);
diff --git a/src/cpu.cpp b/src/cpu.cpp
index ed4eabb..d9fd212 100644
--- a/src/cpu.cpp
+++ b/src/cpu.cpp
@@ -108,7 +108,7 @@
     {
         if (charBits.test(index))
         {
-            if (cap = characteristicsTable[index])
+            if ((cap = characteristicsTable[index]))
             {
                 result.emplace_back(*cap);
             }
diff --git a/src/cpuinfo_main.cpp b/src/cpuinfo_main.cpp
index 5fa1c06..c54cdb6 100644
--- a/src/cpuinfo_main.cpp
+++ b/src/cpuinfo_main.cpp
@@ -578,7 +578,7 @@
             "type='signal',interface='org.freedesktop.DBus.Properties',member='"
             "PropertiesChanged',arg0='xyz.openbmc_project."
             "Configuration.XeonCPU'",
-            [&io, conn, &objServer](sdbusplus::message_t& msg) {
+            [&io, conn, &objServer](sdbusplus::message_t& /* msg */) {
         std::cerr << "get cpu configuration match\n";
         static boost::asio::steady_timer filterTimer(io);
         filterTimer.expires_after(std::chrono::seconds(configCheckInterval));
@@ -642,7 +642,7 @@
 
 } // namespace cpu_info
 
-int main(int argc, char* argv[])
+int main()
 {
     // setup connection to dbus
     boost::asio::io_service& io = cpu_info::dbus::getIOContext();
diff --git a/src/mdrv2.cpp b/src/mdrv2.cpp
index 1bf2e31..aba2775 100644
--- a/src/mdrv2.cpp
+++ b/src/mdrv2.cpp
@@ -225,7 +225,7 @@
     }
     smbiosFile.clear();
     smbiosFile.seekg(0, std::ios_base::end);
-    int fileLength = smbiosFile.tellg();
+    size_t fileLength = smbiosFile.tellg();
     smbiosFile.seekg(0, std::ios_base::beg);
     if (fileLength < sizeof(MDRSMBIOSHeader))
     {
@@ -309,8 +309,9 @@
     return teminate;
 }
 
-bool MDRV2::sendDataInformation(uint8_t idIndex, uint8_t flag, uint32_t dataLen,
-                                uint32_t dataVer, uint32_t timeStamp)
+bool MDRV2::sendDataInformation(uint8_t idIndex, uint8_t /* flag */,
+                                uint32_t dataLen, uint32_t dataVer,
+                                uint32_t timeStamp)
 {
     if (idIndex >= maxDirEntries)
     {
@@ -357,7 +358,7 @@
 
     for (int index = 0; index < smbiosDir.dirEntries; index++)
     {
-        int info = 0;
+        size_t info = 0;
         for (; info < arrayDataInfo.size(); info++)
         {
             if (arrayDataInfo[info] !=
@@ -419,7 +420,7 @@
                             sdbusplus::bus::match::rules::argNpath(
                                 0,
                                 "/xyz/openbmc_project/inventory/system/board/"),
-                        [this, systemInterface](sdbusplus::message_t& msg) {
+                        [this](sdbusplus::message_t& msg) {
                 sdbusplus::message::object_path objectName;
                 boost::container::flat_map<
                     std::string,
@@ -445,8 +446,8 @@
             phosphor::logging::entry("ERROR=%s", e.what()));
     }
 
-    int num = getTotalCpuSlot();
-    if (num == -1)
+    std::optional<size_t> num = getTotalCpuSlot();
+    if (!num)
     {
         phosphor::logging::log<phosphor::logging::level::ERR>(
             "get cpu total slot failed");
@@ -454,12 +455,12 @@
     }
 
     // In case the new size is smaller than old, trim the vector
-    if (num < cpus.size())
+    if (*num < cpus.size())
     {
-        cpus.erase(cpus.begin() + num, cpus.end());
+        cpus.resize(*num);
     }
 
-    for (int index = 0; index < num; index++)
+    for (unsigned int index = 0; index < *num; index++)
     {
         std::string path = cpuPath + std::to_string(index);
         if (index + 1 > cpus.size())
@@ -478,7 +479,7 @@
 #ifdef DIMM_DBUS
 
     num = getTotalDimmSlot();
-    if (num == -1)
+    if (!num)
     {
         phosphor::logging::log<phosphor::logging::level::ERR>(
             "get dimm total slot failed");
@@ -486,12 +487,12 @@
     }
 
     // In case the new size is smaller than old, trim the vector
-    if (num < dimms.size())
+    if (*num < dimms.size())
     {
-        dimms.erase(dimms.begin() + num, dimms.end());
+        dimms.resize(*num);
     }
 
-    for (int index = 0; index < num; index++)
+    for (unsigned int index = 0; index < *num; index++)
     {
         std::string path = dimmPath + std::to_string(index);
         if (index + 1 > dimms.size())
@@ -510,7 +511,7 @@
 #endif
 
     num = getTotalPcieSlot();
-    if (num == -1)
+    if (!num)
     {
         phosphor::logging::log<phosphor::logging::level::ERR>(
             "get pcie total slot failed");
@@ -518,12 +519,12 @@
     }
 
     // In case the new size is smaller than old, trim the vector
-    if (num < pcies.size())
+    if (*num < pcies.size())
     {
-        pcies.erase(pcies.begin() + num, pcies.end());
+        pcies.resize(*num);
     }
 
-    for (int index = 0; index < num; index++)
+    for (unsigned int index = 0; index < *num; index++)
     {
         std::string path = pciePath + std::to_string(index);
         if (index + 1 > pcies.size())
@@ -544,16 +545,16 @@
         bus, systemPath, smbiosDir.dir[smbiosDirIndex].dataStorage);
 }
 
-int MDRV2::getTotalCpuSlot()
+std::optional<size_t> MDRV2::getTotalCpuSlot()
 {
     uint8_t* dataIn = smbiosDir.dir[smbiosDirIndex].dataStorage;
-    int num = 0;
+    size_t num = 0;
 
     if (dataIn == nullptr)
     {
         phosphor::logging::log<phosphor::logging::level::ERR>(
             "get cpu total slot failed - no storage data");
-        return -1;
+        return std::nullopt;
     }
 
     while (1)
@@ -578,16 +579,16 @@
     return num;
 }
 
-int MDRV2::getTotalDimmSlot()
+std::optional<size_t> MDRV2::getTotalDimmSlot()
 {
     uint8_t* dataIn = smbiosDir.dir[smbiosDirIndex].dataStorage;
-    uint8_t num = 0;
+    size_t num = 0;
 
     if (dataIn == nullptr)
     {
         phosphor::logging::log<phosphor::logging::level::ERR>(
             "Fail to get dimm total slot - no storage data");
-        return -1;
+        return std::nullopt;
     }
 
     while (1)
@@ -612,16 +613,16 @@
     return num;
 }
 
-int MDRV2::getTotalPcieSlot()
+std::optional<size_t> MDRV2::getTotalPcieSlot()
 {
     uint8_t* dataIn = smbiosDir.dir[smbiosDirIndex].dataStorage;
-    int num = 0;
+    size_t num = 0;
 
     if (dataIn == nullptr)
     {
         phosphor::logging::log<phosphor::logging::level::ERR>(
             "Fail to get total system slot - no storage data");
-        return -1;
+        return std::nullopt;
     }
 
     while (1)
@@ -677,7 +678,7 @@
     }
 
     auto pos = std::distance(std::begin(buffer), it);
-    auto length = smbiosTableStorageSize - pos;
+    size_t length = smbiosTableStorageSize - pos;
     uint8_t foundMajorVersion;
     uint8_t foundMinorVersion;
 
diff --git a/src/smbios-ipmi-blobs/handler.cpp b/src/smbios-ipmi-blobs/handler.cpp
index 8bd7daf..4b1841f 100644
--- a/src/smbios-ipmi-blobs/handler.cpp
+++ b/src/smbios-ipmi-blobs/handler.cpp
@@ -74,7 +74,7 @@
     return std::vector<std::string>(1, blobId);
 }
 
-bool SmbiosBlobHandler::deleteBlob(const std::string& path)
+bool SmbiosBlobHandler::deleteBlob(const std::string& /* path */)
 {
     return false;
 }
@@ -111,8 +111,9 @@
     return true;
 }
 
-std::vector<uint8_t> SmbiosBlobHandler::read(uint16_t session, uint32_t offset,
-                                             uint32_t requestedSize)
+std::vector<uint8_t> SmbiosBlobHandler::read(uint16_t /* session */,
+                                             uint32_t /* offset */,
+                                             uint32_t /* requestedSize */)
 {
     /* SMBIOS blob handler does not support read. */
     return std::vector<uint8_t>();
@@ -157,8 +158,8 @@
     return true;
 }
 
-bool SmbiosBlobHandler::writeMeta(uint16_t session, uint32_t offset,
-                                  const std::vector<uint8_t>& data)
+bool SmbiosBlobHandler::writeMeta(uint16_t /* session */, uint32_t /* offset */,
+                                  const std::vector<uint8_t>& /* data */)
 {
     return false;
 }
diff --git a/src/system.cpp b/src/system.cpp
index 3e4b69c..c0713a6 100644
--- a/src/system.cpp
+++ b/src/system.cpp
@@ -34,7 +34,7 @@
 namespace smbios
 {
 
-std::string System::uuid(std::string value)
+std::string System::uuid(std::string /* value */)
 {
     uint8_t* dataIn = storage;
     dataIn = getSMBIOSTypePtr(dataIn, systemType);
@@ -120,7 +120,7 @@
     bus.call_noreply(method);
 }
 
-std::string System::version(std::string value)
+std::string System::version(std::string /* value */)
 {
     std::string result = "No BIOS Version";
     uint8_t* dataIn = storage;
@@ -128,7 +128,6 @@
     if (dataIn != nullptr)
     {
         auto biosInfo = reinterpret_cast<struct BIOSInfo*>(dataIn);
-        uint8_t biosVerByte = biosInfo->biosVersion;
         std::string tempS = positionToString(biosInfo->biosVersion,
                                              biosInfo->length, dataIn);
         if (std::find_if(tempS.begin(), tempS.end(),
