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/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;