fix warnings
Fix a couple warnings so we can use meson warning level 3. Instances of
the following warnings are found and resolved:
Wreorder
Wsign-compare
Change-Id: Ia223b42aa6bf743cfa0e7042cc3d5a18977459be
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
diff --git a/include/ADCSensor.hpp b/include/ADCSensor.hpp
index 39b9aaa..dfd8713 100644
--- a/include/ADCSensor.hpp
+++ b/include/ADCSensor.hpp
@@ -69,7 +69,7 @@
boost::asio::deadline_timer waitTimer;
boost::asio::streambuf readBuf;
std::string path;
- int errCount;
+ size_t errCount;
double scaleFactor;
std::optional<BridgeGpio> bridgeGpio;
PowerState readState;
diff --git a/include/CPUSensor.hpp b/include/CPUSensor.hpp
index 589b1f6..8f9cb6e 100644
--- a/include/CPUSensor.hpp
+++ b/include/CPUSensor.hpp
@@ -43,7 +43,7 @@
double privTcontrol;
double dtsOffset;
bool show;
- int errCount;
+ size_t errCount;
void setupRead(void);
void handleResponse(const boost::system::error_code& err);
void checkThresholds(void) override;
diff --git a/include/HwmonTempSensor.hpp b/include/HwmonTempSensor.hpp
index d5c1051..677cab8 100644
--- a/include/HwmonTempSensor.hpp
+++ b/include/HwmonTempSensor.hpp
@@ -24,7 +24,7 @@
boost::asio::deadline_timer waitTimer;
boost::asio::streambuf readBuf;
std::string path;
- int errCount;
+ size_t errCount;
void setupRead(void);
void handleResponse(const boost::system::error_code& err);
void checkThresholds(void) override;
diff --git a/include/PSUEvent.hpp b/include/PSUEvent.hpp
index e47670b..89840a3 100644
--- a/include/PSUEvent.hpp
+++ b/include/PSUEvent.hpp
@@ -41,7 +41,7 @@
private:
int value = 0;
- int errCount;
+ size_t errCount;
std::string path;
std::string eventName;
boost::asio::deadline_timer waitTimer;
diff --git a/include/PSUSensor.hpp b/include/PSUSensor.hpp
index c0ebe6a..4ab553f 100644
--- a/include/PSUSensor.hpp
+++ b/include/PSUSensor.hpp
@@ -27,7 +27,7 @@
boost::asio::deadline_timer waitTimer;
boost::asio::streambuf readBuf;
std::string path;
- int errCount;
+ size_t errCount;
unsigned int sensorFactor;
void setupRead(void);
void handleResponse(const boost::system::error_code& err);
diff --git a/include/TachSensor.hpp b/include/TachSensor.hpp
index 567355b..c7c1b0e 100644
--- a/include/TachSensor.hpp
+++ b/include/TachSensor.hpp
@@ -83,7 +83,7 @@
boost::asio::deadline_timer waitTimer;
boost::asio::streambuf readBuf;
std::string path;
- int errCount;
+ size_t errCount;
void setupRead(void);
void handleResponse(const boost::system::error_code& err);
void checkThresholds(void) override;
diff --git a/include/sensor.hpp b/include/sensor.hpp
index f83a45e..263cbfb 100644
--- a/include/sensor.hpp
+++ b/include/sensor.hpp
@@ -19,7 +19,7 @@
const double max, const double min) :
name(name),
configurationPath(configurationPath), objectType(objectType),
- thresholds(std::move(thresholdData)), maxValue(max), minValue(min),
+ maxValue(max), minValue(min), thresholds(std::move(thresholdData)),
hysteresis((max - min) * 0.01)
{
}