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/FanMain.cpp b/src/FanMain.cpp
index eeface8..b0237c2 100644
--- a/src/FanMain.cpp
+++ b/src/FanMain.cpp
@@ -165,7 +165,8 @@
sensorData = &(sensor.second);
break;
}
- else if (baseType == "xyz.openbmc_project.Configuration.I2CFan")
+ else if (baseType ==
+ std::string("xyz.openbmc_project.Configuration.I2CFan"))
{
auto findBus = baseConfiguration->second.find("Bus");
auto findAddress = baseConfiguration->second.find("Address");
@@ -374,7 +375,7 @@
"org.freedesktop.DBus.ObjectManager", "GetManagedObjects");
}
-int main(int argc, char** argv)
+int main()
{
boost::asio::io_service io;
auto systemBus = std::make_shared<sdbusplus::asio::connection>(io);
@@ -435,7 +436,7 @@
// redundancy sensor
std::function<void(sdbusplus::message::message&)> redundancyHandler =
[&tachSensors, &systemBus,
- &objectServer](sdbusplus::message::message& message) {
+ &objectServer](sdbusplus::message::message&) {
createRedundancySensor(tachSensors, systemBus, objectServer);
};
auto match = std::make_unique<sdbusplus::bus::match::match>(
@@ -443,7 +444,7 @@
"type='signal',member='PropertiesChanged',path_namespace='" +
std::string(inventoryPath) + "',arg0namespace='" +
redundancyConfiguration + "'",
- redundancyHandler);
+ std::move(redundancyHandler));
matches.emplace_back(std::move(match));
io.run();