meson support: remove code warnings 1
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 monitor
and presence changes (and top-level json_config.hpp).
Signed-off-by: Mike Capps <mikepcapps@gmail.com>
Change-Id: I7280b512c54e8d5aeba3300764a239f3dcbab14d
diff --git a/monitor/system.cpp b/monitor/system.cpp
index aff3bdc..6e2ccfa 100644
--- a/monitor/system.cpp
+++ b/monitor/system.cpp
@@ -84,7 +84,7 @@
#ifdef MONITOR_USE_JSON
try
{
- jsonObj = getJsonObj(_bus);
+ jsonObj = getJsonObj();
#endif
auto trustGrps = getTrustGroups(jsonObj);
auto fanDefs = getFanDefinitions(jsonObj);
@@ -231,7 +231,7 @@
}
const std::vector<CreateGroupFunction>
- System::getTrustGroups(const json& jsonObj)
+ System::getTrustGroups([[maybe_unused]] const json& jsonObj)
{
#ifdef MONITOR_USE_JSON
return getTrustGrps(jsonObj);
@@ -245,7 +245,8 @@
_trust = std::make_unique<trust::Manager>(groupFuncs);
}
-const std::vector<FanDefinition> System::getFanDefinitions(const json& jsonObj)
+const std::vector<FanDefinition>
+ System::getFanDefinitions([[maybe_unused]] const json& jsonObj)
{
#ifdef MONITOR_USE_JSON
return getFanDefs(jsonObj);
@@ -334,7 +335,7 @@
}
}
-void System::setFaultConfig(const json& jsonObj)
+void System::setFaultConfig([[maybe_unused]] const json& jsonObj)
{
#ifdef MONITOR_USE_JSON
std::shared_ptr<PowerInterfaceBase> powerInterface =