Fix build warnings

This commit fixes some build warnings in CI caused by unused variables
and an invalid move assignment operator, since a member variable is of
reference type.

Signed-off-by: John Wedig <johnwedig@google.com>
Change-Id: I2b813ef017e47f2d35666063435a52638b74d156
diff --git a/include/estoraged.hpp b/include/estoraged.hpp
index c938c33..42d60f3 100644
--- a/include/estoraged.hpp
+++ b/include/estoraged.hpp
@@ -63,7 +63,7 @@
     EStoraged& operator=(const EStoraged&) = delete;
     EStoraged(const EStoraged&) = delete;
     EStoraged(EStoraged&&) = default;
-    EStoraged& operator=(EStoraged&&) = default;
+    EStoraged& operator=(EStoraged&&) = delete;
 
     /** @brief Format the LUKS encrypted device and create empty filesystem.
      *
diff --git a/include/sanitize.hpp b/include/sanitize.hpp
index 7ec5a4a..91cf103 100644
--- a/include/sanitize.hpp
+++ b/include/sanitize.hpp
@@ -17,8 +17,6 @@
 namespace estoraged
 {
 
-using stdplus::fd::ManagedFd;
-
 class IOCTLWrapperInterface
 {
   public:
diff --git a/src/erase/sanitize.cpp b/src/erase/sanitize.cpp
index 26e39fb..ac1770d 100644
--- a/src/erase/sanitize.cpp
+++ b/src/erase/sanitize.cpp
@@ -21,7 +21,6 @@
 {
 
 constexpr uint32_t mmcSwitch = 6;
-constexpr uint32_t mmcSendExtCsd = 8;
 constexpr uint32_t mmcSwitchModeWriteByte = 0x03;
 constexpr uint32_t extCsdSanitizeStart = 165;
 constexpr uint32_t extCsdCmdSetNormal = (1 << 0);
@@ -32,7 +31,6 @@
 constexpr uint32_t mmcRspOpcode = (1 << 4);
 
 constexpr uint32_t mmcCmdAc = (0 << 5);
-constexpr uint32_t mmcCmdAdtc = (1 << 5);
 
 constexpr uint32_t mmcRspSpiS1 = (1 << 7);
 constexpr uint32_t mmcRspSpiBusy = (1 << 10);
diff --git a/src/main.cpp b/src/main.cpp
index 2f93899..578d505 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -31,14 +31,14 @@
  * more types of storage devices.
  */
 void createStorageObjects(
-    boost::asio::io_context& io, sdbusplus::asio::object_server& objectServer,
+    sdbusplus::asio::object_server& objectServer,
     boost::container::flat_map<
         std::string, std::unique_ptr<estoraged::EStoraged>>& storageObjects,
     std::shared_ptr<sdbusplus::asio::connection>& dbusConnection)
 {
     auto getter = std::make_shared<estoraged::GetStorageConfiguration>(
         dbusConnection,
-        [&io, &objectServer, &storageObjects](
+        [&objectServer, &storageObjects](
             const estoraged::ManagedStorageType& storageConfigurations) {
             size_t numConfigObj = storageConfigurations.size();
             if (numConfigObj > 1)
@@ -124,9 +124,8 @@
                                    std::unique_ptr<estoraged::EStoraged>>
             storageObjects;
 
-        boost::asio::post(io, [&]() {
-            createStorageObjects(io, server, storageObjects, conn);
-        });
+        boost::asio::post(
+            io, [&]() { createStorageObjects(server, storageObjects, conn); });
 
         /*
          * Set up an event handler to process any new configuration objects
@@ -160,7 +159,7 @@
                             lg2::error("timer error");
                             return;
                         }
-                        createStorageObjects(io, server, storageObjects, conn);
+                        createStorageObjects(server, storageObjects, conn);
                     });
             };