Turn on a bunch of warnings
Turn on as many warnings as easily possible from:
https://github.com/lefticus/cppbestpractices/blob/e73393f25a85f83fed7399d8b65cb117d00b2231/02-Use_the_Tools_Available.md#L100
Tested:
ipmitool sensor list still works
Change-Id: Ied8fa66de9fcd25e448f8048c4f8216b426b6f55
Signed-off-by: James Feist <james.feist@linux.intel.com>
diff --git a/src/ExitAirTempSensor.cpp b/src/ExitAirTempSensor.cpp
index a4aba4b..972b42b 100644
--- a/src/ExitAirTempSensor.cpp
+++ b/src/ExitAirTempSensor.cpp
@@ -266,8 +266,7 @@
void CFMSensor::createMaxCFMIface(void)
{
- cfmLimitIface->register_property("Limit", static_cast<double>(c2) * maxCFM *
- tachs.size());
+ cfmLimitIface->register_property("Limit", c2 * maxCFM * tachs.size());
cfmLimitIface->initialize();
}
@@ -686,7 +685,7 @@
(qMax - qMin) * (cfm - qMin));
}
- totalPower *= powerFactor;
+ totalPower *= static_cast<double>(powerFactor);
totalPower += pOffset;
if (totalPower == 0)
@@ -709,7 +708,7 @@
// Calculate the exit air temp
// Texit = Tfp + (1.76 * TotalPower / CFM * Faltitude)
- double reading = 1.76 * totalPower * altitudeFactor;
+ double reading = 1.76 * totalPower * static_cast<double>(altitudeFactor);
reading /= cfm;
reading += inletTemp;
@@ -890,7 +889,7 @@
"GetManagedObjects");
}
-int main(int argc, char** argv)
+int main()
{
boost::asio::io_service io;
@@ -906,7 +905,7 @@
boost::asio::deadline_timer configTimer(io);
std::function<void(sdbusplus::message::message&)> eventHandler =
- [&](sdbusplus::message::message& message) {
+ [&](sdbusplus::message::message&) {
configTimer.expires_from_now(boost::posix_time::seconds(1));
// create a timer because normally multiple properties change
configTimer.async_wait([&](const boost::system::error_code& ec) {