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/roles.hpp b/redfish-core/lib/roles.hpp
index fbe8653..782d23c 100644
--- a/redfish-core/lib/roles.hpp
+++ b/redfish-core/lib/roles.hpp
@@ -160,6 +160,11 @@
                 memberArray = nlohmann::json::array();
                 const std::vector<std::string>* privList =
                     std::get_if<std::vector<std::string>>(&resp);
+                if (privList == nullptr)
+                {
+                    messages::internalError(asyncResp->res);
+                    return;
+                }
                 for (const std::string& priv : *privList)
                 {
                     std::string role = getRoleFromPrivileges(priv);