meson support: remove code warnings 2

This commit contains code changes necessary to support the increased
warning level from Meson builds. Most changes are for unused variables.
to keep the review size manageable, this commit contains only control
changes (plus one in sensor-monitor).

Change-Id: Ie20f1d9028add4b605e4cc9fb230940710365706
Signed-off-by: Mike Capps <mikepcapps@gmail.com>
diff --git a/control/json/actions/mapped_floor.cpp b/control/json/actions/mapped_floor.cpp
index 34cbfac..55414ac 100644
--- a/control/json/actions/mapped_floor.cpp
+++ b/control/json/actions/mapped_floor.cpp
@@ -197,7 +197,7 @@
 }
 
 std::optional<PropertyVariantType>
-    MappedFloor::getMaxGroupValue(const Group& group, const Manager& manager)
+    MappedFloor::getMaxGroupValue(const Group& group)
 {
     std::optional<PropertyVariantType> max;
     bool checked = false;
@@ -257,9 +257,8 @@
 void MappedFloor::run(Zone& zone)
 {
     std::optional<uint64_t> newFloor;
-    auto& manager = *zone.getManager();
 
-    auto keyValue = getMaxGroupValue(*_keyGroup, manager);
+    auto keyValue = getMaxGroupValue(*_keyGroup);
     if (!keyValue)
     {
         auto floor = _defaultFloor ? *_defaultFloor : zone.getDefaultFloor();
@@ -312,8 +311,8 @@
             }
             else
             {
-                propertyValue = getMaxGroupValue(
-                    *std::get<const Group*>(groupOrParameter), manager);
+                propertyValue =
+                    getMaxGroupValue(*std::get<const Group*>(groupOrParameter));
             }
 
             std::optional<uint64_t> floor;
diff --git a/control/json/actions/mapped_floor.hpp b/control/json/actions/mapped_floor.hpp
index 6866250..9c8a937 100644
--- a/control/json/actions/mapped_floor.hpp
+++ b/control/json/actions/mapped_floor.hpp
@@ -1,5 +1,5 @@
 /**
- * Copyright © 2021 IBM Corporation
+ * Copyright © 2022 IBM Corporation
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -192,12 +192,9 @@
      *
      * @param[in] group - The group to get the max value of
      *
-     * @param[in] manager - The Manager object
-     *
      * @return optional<PropertyVariantType> - The value, or std::nullopt
      */
-    std::optional<PropertyVariantType> getMaxGroupValue(const Group& group,
-                                                        const Manager& manager);
+    std::optional<PropertyVariantType> getMaxGroupValue(const Group& group);
 
     /**
      * @brief Returns a pointer to the group object specified
diff --git a/control/json/actions/net_target_increase.cpp b/control/json/actions/net_target_increase.cpp
index 6b30e06..cc08cfa 100644
--- a/control/json/actions/net_target_increase.cpp
+++ b/control/json/actions/net_target_increase.cpp
@@ -90,7 +90,7 @@
                                 auto deltaFactor =
                                     std::max((std::get<int64_t>(value) -
                                               std::get<int64_t>(_state)),
-                                             1ll);
+                                             int64_t(1));
                                 incDelta =
                                     static_cast<uint64_t>(deltaFactor * _delta);
                             }
diff --git a/control/json/actions/pcie_card_floors.cpp b/control/json/actions/pcie_card_floors.cpp
index 512c678..7ec1a87 100644
--- a/control/json/actions/pcie_card_floors.cpp
+++ b/control/json/actions/pcie_card_floors.cpp
@@ -1,5 +1,5 @@
 /**
- * Copyright © 2021 IBM Corporation
+ * Copyright © 2022 IBM Corporation
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -50,12 +50,12 @@
     {
         _settleTimer =
             std::make_unique<Timer>(util::SDEventPlus::getEvent(),
-                                    [&zone, this](Timer&) { execute(zone); });
+                                    [&zone, this](Timer&) { execute(); });
     }
     _settleTimer->restartOnce(_settleTime);
 }
 
-void PCIeCardFloors::execute(Zone& zone)
+void PCIeCardFloors::execute()
 {
     size_t hotCards = 0;
     size_t numTempSensorCards = 0;
diff --git a/control/json/actions/pcie_card_floors.hpp b/control/json/actions/pcie_card_floors.hpp
index 7b73d39..a662a6d 100644
--- a/control/json/actions/pcie_card_floors.hpp
+++ b/control/json/actions/pcie_card_floors.hpp
@@ -106,16 +106,14 @@
      * to distinguish it from ones under different events and also it just
      * makes it uglier in the flight recorder.
      */
-    void setEventName(const std::string& name) override
+    void setEventName(const std::string& /*name*/) override
     {}
 
   private:
     /**
      * @brief Runs the contents of the action when the settle timer expires.
-     *
-     * @param[in] zone - Zone to run the action on
      */
-    void execute(Zone& zone);
+    void execute();
 
     /**
      * @brief Constructs the PCIeCardMetadata object to load the PCIe card
diff --git a/control/json/actions/set_parameter_from_group_max.cpp b/control/json/actions/set_parameter_from_group_max.cpp
index ae5b31d..c7d18a1 100644
--- a/control/json/actions/set_parameter_from_group_max.cpp
+++ b/control/json/actions/set_parameter_from_group_max.cpp
@@ -33,7 +33,7 @@
     setModifier(jsonObj);
 }
 
-void SetParameterFromGroupMax::run(Zone& zone)
+void SetParameterFromGroupMax::run(Zone& /*zone*/)
 {
     std::optional<PropertyVariantType> max;
 
diff --git a/control/json/actions/set_parameter_from_group_max.hpp b/control/json/actions/set_parameter_from_group_max.hpp
index ae18eef4..ad0114c 100644
--- a/control/json/actions/set_parameter_from_group_max.hpp
+++ b/control/json/actions/set_parameter_from_group_max.hpp
@@ -66,7 +66,7 @@
     SetParameterFromGroupMax&
         operator=(const SetParameterFromGroupMax&) = delete;
     SetParameterFromGroupMax& operator=(SetParameterFromGroupMax&&) = delete;
-    ~SetParameterFromGroupMax() = default;
+    virtual ~SetParameterFromGroupMax() = default;
 
     /**
      * @brief Constructor
diff --git a/control/json/config_base.hpp b/control/json/config_base.hpp
index 5bfb9f2..a7b47b8 100644
--- a/control/json/config_base.hpp
+++ b/control/json/config_base.hpp
@@ -50,6 +50,7 @@
     ConfigBase(ConfigBase&&) = delete;
     ConfigBase& operator=(const ConfigBase&) = delete;
     ConfigBase& operator=(ConfigBase&&) = delete;
+
     virtual ~ConfigBase() = default;
 
     explicit ConfigBase(const json& jsonObj)
diff --git a/control/json/manager.cpp b/control/json/manager.cpp
index 457324c..19d9d9b 100644
--- a/control/json/manager.cpp
+++ b/control/json/manager.cpp
@@ -1,5 +1,5 @@
 /**
- * Copyright © 2020 IBM Corporation
+ * Copyright © 2022 IBM Corporation
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
diff --git a/control/json/manager.hpp b/control/json/manager.hpp
index 3fbcc9c..78963a4 100644
--- a/control/json/manager.hpp
+++ b/control/json/manager.hpp
@@ -1,5 +1,5 @@
 /**
- * Copyright © 2020 IBM Corporation
+ * Copyright © 2022 IBM Corporation
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -16,7 +16,6 @@
 #pragma once
 
 #include "action.hpp"
-#include "config_base.hpp"
 #include "event.hpp"
 #include "group.hpp"
 #include "json_config.hpp"
@@ -59,6 +58,7 @@
     oneshot,
     repeating,
 };
+
 /**
  * Package of data required when a timer expires
  * Tuple constructed of:
diff --git a/control/json/triggers/init.cpp b/control/json/triggers/init.cpp
index 6556fdc..7452584 100644
--- a/control/json/triggers/init.cpp
+++ b/control/json/triggers/init.cpp
@@ -138,8 +138,8 @@
     }
 }
 
-enableTrigger triggerInit(const json& jsonObj, const std::string& eventName,
-                          std::vector<std::unique_ptr<ActionBase>>& actions)
+enableTrigger triggerInit(const json& jsonObj, const std::string& /*eventName*/,
+                          std::vector<std::unique_ptr<ActionBase>>& /*actions*/)
 {
     // Get the method handler if configured
     auto handler = methods.end();
diff --git a/control/json/triggers/parameter.cpp b/control/json/triggers/parameter.cpp
index 3abe57c..6f4eac3 100644
--- a/control/json/triggers/parameter.cpp
+++ b/control/json/triggers/parameter.cpp
@@ -26,7 +26,7 @@
 
 enableTrigger
     triggerParameter(const json& jsonObj, const std::string& eventName,
-                     std::vector<std::unique_ptr<ActionBase>>& actions)
+                     std::vector<std::unique_ptr<ActionBase>>& /*actions*/)
 {
     if (!jsonObj.contains("parameter"))
     {
@@ -38,8 +38,8 @@
 
     auto name = jsonObj["parameter"].get<std::string>();
 
-    return [name](const std::string& eventName, Manager* mgr,
-                  const std::vector<Group>& groups,
+    return [name](const std::string& /*eventName*/, Manager* /*mgr*/,
+                  const std::vector<Group>& /*groups*/,
                   std::vector<std::unique_ptr<ActionBase>>& actions) {
         Manager::addParameterTrigger(name, actions);
     };
diff --git a/control/json/triggers/signal.cpp b/control/json/triggers/signal.cpp
index 9f7caa3..10a42d6 100644
--- a/control/json/triggers/signal.cpp
+++ b/control/json/triggers/signal.cpp
@@ -192,7 +192,7 @@
                                        SignalObject(), actions};
                 // If signal match already exists, then the service will be the
                 // same so add action to be run
-                auto isSameSig = [](SignalPkg& pkg) { return true; };
+                auto isSameSig = [](SignalPkg&) { return true; };
 
                 subscribe(match, std::move(signalPkg), isSameSig, mgr);
                 grpServices.emplace_back(serv);
@@ -220,7 +220,7 @@
     SignalPkg signalPkg = {Handlers::member, SignalObject(), actions};
     // If signal match already exists, then the member signal will be the
     // same so add action to be run
-    auto isSameSig = [](SignalPkg& pkg) { return true; };
+    auto isSameSig = [](SignalPkg&) { return true; };
 
     // Groups are optional, but a signal triggered event with no groups
     // will do nothing since signals require a group
@@ -235,8 +235,9 @@
     }
 }
 
-enableTrigger triggerSignal(const json& jsonObj, const std::string& eventName,
-                            std::vector<std::unique_ptr<ActionBase>>& actions)
+enableTrigger
+    triggerSignal(const json& jsonObj, const std::string& eventName,
+                  std::vector<std::unique_ptr<ActionBase>>& /*actions*/)
 {
     auto subscriber = signals.end();
     if (jsonObj.contains("signal"))
@@ -262,7 +263,7 @@
     }
 
     return [subscriber = std::move(subscriber),
-            jsonObj](const std::string& eventName, Manager* mgr,
+            jsonObj](const std::string& /*eventName*/, Manager* mgr,
                      const std::vector<Group>& groups,
                      std::vector<std::unique_ptr<ActionBase>>& actions) {
         TriggerActions signalActions;
diff --git a/control/json/triggers/timer.cpp b/control/json/triggers/timer.cpp
index e04bdd0..ce8bba7 100644
--- a/control/json/triggers/timer.cpp
+++ b/control/json/triggers/timer.cpp
@@ -81,8 +81,9 @@
     return false;
 }
 
-enableTrigger triggerTimer(const json& jsonObj, const std::string& eventName,
-                           std::vector<std::unique_ptr<ActionBase>>& actions)
+enableTrigger
+    triggerTimer(const json& jsonObj, const std::string& /*eventName*/,
+                 std::vector<std::unique_ptr<ActionBase>>& /*actions*/)
 {
     // Get the type and interval of this timer from the JSON
     auto type = getType(jsonObj);
diff --git a/control/json/utils/modifier.cpp b/control/json/utils/modifier.cpp
index 2374960..501a035 100644
--- a/control/json/utils/modifier.cpp
+++ b/control/json/utils/modifier.cpp
@@ -126,7 +126,7 @@
         return value;
     }
 
-    PropertyVariantType operator()(bool val) override
+    PropertyVariantType operator()(bool) override
     {
         throw std::runtime_error{
             "Bool not allowed as a 'minus' modifier value"};
@@ -271,7 +271,7 @@
         return getDefaultValue(rangeValues.back().second, defaultValue);
     }
 
-    PropertyVariantType operator()(bool val) override
+    PropertyVariantType operator()(bool) override
     {
         throw std::runtime_error{
             "Bool not allowed as a 'less_than' modifier value"};
diff --git a/control/json/utils/modifier.hpp b/control/json/utils/modifier.hpp
index 6153279..8959203 100644
--- a/control/json/utils/modifier.hpp
+++ b/control/json/utils/modifier.hpp
@@ -1,5 +1,5 @@
 /**
- * Copyright © 2021 IBM Corporation
+ * Copyright © 2022 IBM Corporation
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -55,6 +55,8 @@
      */
     struct BaseOperator
     {
+        virtual ~BaseOperator() = default;
+
         virtual PropertyVariantType operator()(double val) = 0;
 
         virtual PropertyVariantType operator()(int32_t val) = 0;