Implement clang-tidy fixes
clang-tidy allows the CI robot to check many things via static analysis.
All changes here were made by the clang-tidy robot, and include a number
of modernization fixes. updating the tidy file will be done at a later
date.
Signed-off-by: Ed Tanous <etanous@nvidia.com>
Change-Id: I98cc4d600a3c589675507958f6d2350b2141216b
diff --git a/test/pid_zone_unittest.cpp b/test/pid_zone_unittest.cpp
index e4e7a26..37fb0fa 100644
--- a/test/pid_zone_unittest.cpp
+++ b/test/pid_zone_unittest.cpp
@@ -92,7 +92,7 @@
{
protected:
PidZoneTest() :
- property_index(), properties(), sdbus_mock_passive(), sdbus_mock_host(),
+ properties(), sdbus_mock_passive(), sdbus_mock_host(),
sdbus_mock_mode(), sdbus_mock_enable()
{
EXPECT_CALL(sdbus_mock_host,
@@ -122,7 +122,7 @@
}
// unused
- double property_index;
+ double property_index{};
std::vector<std::string> properties;
double propertyenable_index;
std::vector<std::string> propertiesenable;
@@ -322,7 +322,7 @@
std::map<std::string, std::pair<std::string, double>> failSensorList =
zone->getFailSafeSensors();
- EXPECT_EQ(1, failSensorList.size());
+ EXPECT_EQ(1U, failSensorList.size());
EXPECT_EQ("Sensor threshold asserted", failSensorList["temp1"].first);
EXPECT_EQ(failSafePercent, failSensorList["temp1"].second);
}
@@ -349,7 +349,7 @@
std::map<std::string, std::pair<std::string, double>> failSensorList =
zone->getFailSafeSensors();
- EXPECT_EQ(3, failSensorList.size());
+ EXPECT_EQ(3U, failSensorList.size());
EXPECT_EQ("Sensor threshold asserted", failSensorList["temp1"].first);
EXPECT_EQ(60, failSensorList["temp1"].second);
EXPECT_EQ("Sensor reading bad", failSensorList["temp2"].first);