Fix some warnings
-werror on the newest version of GCC finds even more stuff than was
found before. Fix all of them.
Tested: No functional change. In theory these cases can't occur unless
a dbus interface is broken.
Signed-off-by: Ed Tanous <ed.tanous@intel.com>
Change-Id: Id11e29e4851075b511e69cbc006aa8d7e1e229f0
diff --git a/redfish-core/lib/log_services.hpp b/redfish-core/lib/log_services.hpp
index 7a63162..233578e 100644
--- a/redfish-core/lib/log_services.hpp
+++ b/redfish-core/lib/log_services.hpp
@@ -902,9 +902,10 @@
}
entriesArray.push_back({});
nlohmann::json &thisEntry = entriesArray.back();
- uint32_t *id;
- std::time_t timestamp;
- std::string *severity, *message;
+ uint32_t *id = nullptr;
+ std::time_t timestamp{};
+ std::string *severity = nullptr;
+ std::string *message = nullptr;
for (auto &propertyMap : interfaceMap.second)
{
if (propertyMap.first == "Id")
@@ -1028,9 +1029,10 @@
messages::internalError(asyncResp->res);
return;
}
- uint32_t *id;
- std::time_t timestamp;
- std::string *severity, *message;
+ uint32_t *id = nullptr;
+ std::time_t timestamp{};
+ std::string *severity = nullptr;
+ std::string *message = nullptr;
for (auto &propertyMap : resp)
{
if (propertyMap.first == "Id")