Fix a bunch of warnings
using the list of warnings from here:
https://github.com/lefticus/cppbestpractices/blob/e73393f25a85f83fed7399d8b65cb117d00b2231/02-Use_the_Tools_Available.md#L100
Seems like a good place to start, and would improve things a bit
type-wise. This patchset attempts to correct all the issues in one
shot.
Tested:
It builds. Will test various subsystems that have been touched
Signed-off-by: Ed Tanous <ed.tanous@intel.com>
Change-Id: I588c26440e5a97f718a0f0ea74cc84107d53aa1e
diff --git a/include/image_upload.hpp b/include/image_upload.hpp
index 867d1bc..529e056 100644
--- a/include/image_upload.hpp
+++ b/include/image_upload.hpp
@@ -29,10 +29,10 @@
return;
}
// Make this const static so it survives outside this method
- static boost::asio::deadline_timer timeout(*req.ioService,
- boost::posix_time::seconds(5));
+ static boost::asio::steady_timer timeout(*req.ioService,
+ std::chrono::seconds(5));
- timeout.expires_from_now(boost::posix_time::seconds(15));
+ timeout.expires_after(std::chrono::seconds(15));
auto timeoutHandler = [&res](const boost::system::error_code& ec) {
fwUpdateMatcher = nullptr;
@@ -76,12 +76,7 @@
"xyz.openbmc_project.Software.Version";
}) != interfaces.end())
{
- boost::system::error_code ec;
- timeout.cancel(ec);
- if (ec)
- {
- BMCWEB_LOG_ERROR << "error canceling timer " << ec;
- }
+ timeout.cancel();
std::size_t index = path.str.rfind('/');
if (index != std::string::npos)