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/dbus_monitor.hpp b/include/dbus_monitor.hpp
index 1b82697..8c46cf4 100644
--- a/include/dbus_monitor.hpp
+++ b/include/dbus_monitor.hpp
@@ -109,7 +109,7 @@
connection->sendText(j.dump());
return 0;
-};
+}
template <typename... Middlewares> void requestRoutes(Crow<Middlewares...>& app)
{
@@ -150,7 +150,7 @@
nlohmann::json::iterator paths = j.find("paths");
if (paths != j.end())
{
- int interfaceCount = thisSession.interfaces.size();
+ size_t interfaceCount = thisSession.interfaces.size();
if (interfaceCount == 0)
{
interfaceCount = 1;
@@ -160,7 +160,7 @@
// PropertiesChanged
thisSession.matches.reserve(thisSession.matches.size() +
paths->size() *
- (1 + interfaceCount));
+ (1U + interfaceCount));
}
std::string object_manager_match_string;
std::string properties_match_string;