phosphor-ipmi-flash: Code Health Cleanup

Removed the following warning.
- using decl '*' is unused
- 'push_back' is called inside a loop; consider pre-allocating the
    container capacity before the loop
- function '*' defined in a header file; function
    definitions in header files can lead to ODR violations

Change-Id: I44e4b0f8056a853fb45b690394be1a8ebec45b20
Signed-off-by: Willy Tu <wltu@google.com>
diff --git a/bmc/firmware-handler/firmware_handler.cpp b/bmc/firmware-handler/firmware_handler.cpp
index afcfc81..9268809 100644
--- a/bmc/firmware-handler/firmware_handler.cpp
+++ b/bmc/firmware-handler/firmware_handler.cpp
@@ -56,10 +56,10 @@
     }
 
     std::vector<std::string> blobs;
-    for (const auto& item : firmwares)
-    {
-        blobs.push_back(item.blobName);
-    }
+    blobs.reserve(firmwares.size());
+    std::for_each(
+        firmwares.begin(), firmwares.end(),
+        [&blobs](const auto& blob) { blobs.emplace_back(blob.blobName); });
 
     if (0 == std::count(blobs.begin(), blobs.end(), hashBlobId))
     {
diff --git a/bmc/firmware-handler/test/create_action_map.hpp b/bmc/firmware-handler/test/create_action_map.hpp
index 8238e2f..aa416e0 100644
--- a/bmc/firmware-handler/test/create_action_map.hpp
+++ b/bmc/firmware-handler/test/create_action_map.hpp
@@ -11,7 +11,7 @@
 
 namespace ipmi_flash
 {
-ActionMap CreateActionMap(const std::string& blobPath)
+static ActionMap CreateActionMap(const std::string& blobPath)
 {
     std::unique_ptr<ActionPack> actionPack = std::make_unique<ActionPack>();
     actionPack->preparation = CreateTriggerMock();
@@ -22,5 +22,4 @@
     map[blobPath] = std::move(actionPack);
     return map;
 }
-
 } // namespace ipmi_flash
diff --git a/bmc/firmware-handler/test/meson.build b/bmc/firmware-handler/test/meson.build
index 38a8a1c..4ea436e 100644
--- a/bmc/firmware-handler/test/meson.build
+++ b/bmc/firmware-handler/test/meson.build
@@ -29,7 +29,8 @@
       build_by_default: false,
       implicit_include_directories: false,
       include_directories: [root_inc, bmc_test_inc, firmware_inc],
-      dependencies: [firmware_dep, gtest, gmock]))
+      dependencies:
+        [firmware_dep, image_mock_dep, triggerable_mock_dep, gtest, gmock]))
 endforeach
 
 file_handler_test = executable(