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/CPUSensorMain.cpp b/src/CPUSensorMain.cpp
index 2f2319d..2588221 100644
--- a/src/CPUSensorMain.cpp
+++ b/src/CPUSensorMain.cpp
@@ -154,7 +154,7 @@
bus = std::stoi(busStr);
addr = std::stoi(addrStr, 0, 16);
}
- catch (std::invalid_argument)
+ catch (std::invalid_argument&)
{
continue;
}
@@ -243,7 +243,7 @@
auto directory = hwmonNamePath.parent_path();
std::vector<fs::path> inputPaths;
- if (!findFiles(fs::path(directory), R"(temp\d+_input$)", inputPaths, 0))
+ if (!findFiles(directory, R"(temp\d+_input$)", inputPaths, 0))
{
std::cerr << "No temperature sensors in system\n";
continue;
@@ -645,7 +645,7 @@
return false;
}
-int main(int argc, char** argv)
+int main()
{
boost::asio::io_service io;
auto systemBus = std::make_shared<sdbusplus::asio::connection>(io);