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/redfish-core/lib/certificate_service.hpp b/redfish-core/lib/certificate_service.hpp
index 111bcec..89d5634 100644
--- a/redfish-core/lib/certificate_service.hpp
+++ b/redfish-core/lib/certificate_service.hpp
@@ -458,13 +458,7 @@
             *crow::connections::systemBus, match,
             [asyncResp, service, objectPath,
              certURI](sdbusplus::message::message &m) {
-                boost::system::error_code ec;
-                timeout.cancel(ec);
-                if (ec)
-                {
-                    BMCWEB_LOG_ERROR << "error canceling timer " << ec;
-                    csrMatcher = nullptr;
-                }
+                timeout.cancel();
                 if (m.is_method_error())
                 {
                     BMCWEB_LOG_ERROR << "Dbus method error!!!";
@@ -489,7 +483,7 @@
                 }
             });
         crow::connections::systemBus->async_method_call(
-            [asyncResp](const boost::system::error_code ec,
+            [asyncResp](const boost::system::error_code &ec,
                         const std::string &path) {
                 if (ec)
                 {
@@ -531,14 +525,16 @@
         {
             break;
         }
-        const std::string_view key(tokenBegin, i - tokenBegin);
+        const std::string_view key(tokenBegin,
+                                   static_cast<size_t>(i - tokenBegin));
         i++;
         tokenBegin = i;
         while (i != value.end() && *i != ',')
         {
             i++;
         }
-        const std::string_view val(tokenBegin, i - tokenBegin);
+        const std::string_view val(tokenBegin,
+                                   static_cast<size_t>(i - tokenBegin));
         if (key == "L")
         {
             out["City"] = val;