Enable clang warnings

This commit enables clang warnings, and fixes all warnings that were
found.  Most of these fall into a couple categories:

Variable shadow issues were fixed by renaming variables

unused parameter warnings were resolved by either checking error codes
that had been ignored, or removing the name of the variable from the
scope.

Other various warnings were fixed in the best way I was able to come up
with.

Note, the redfish Node class is especially insidious, as it causes all
imlementers to have variables for parameters, regardless of whether or
not they are used.  Deprecating the Node class is on my list of things
to do, as it adds extra overhead, and in general isn't a useful
abstraction.  For now, I have simply fixed all the handlers.

Tested:
Added the current meta-clang meta layer into bblayers.conf, and added
TOOLCHAIN_pn-bmcweb = "clang" to my local.conf

Signed-off-by: Ed Tanous <ed@tanous.net>
Change-Id: Ia75b94010359170159c703e535d1c1af182fe700
diff --git a/redfish-core/include/privileges.hpp b/redfish-core/include/privileges.hpp
index 0282f35..d9bf1fc 100644
--- a/redfish-core/include/privileges.hpp
+++ b/redfish-core/include/privileges.hpp
@@ -45,8 +45,9 @@
 constexpr const size_t maxPrivilegeCount = 32;
 
 /** @brief A vector of all privilege names and their indexes */
-static const std::vector<std::string> privilegeNames{basePrivileges.begin(),
-                                                     basePrivileges.end()};
+static const std::array<std::string, maxPrivilegeCount> privilegeNames{
+    "Login", "ConfigureManager", "ConfigureComponents", "ConfigureSelf",
+    "ConfigureUsers"};
 
 /**
  * @brief Redfish privileges
@@ -100,7 +101,7 @@
      * @return               None
      *
      */
-    bool setSinglePrivilege(const char* privilege)
+    bool setSinglePrivilege(const std::string_view privilege)
     {
         for (size_t searchIndex = 0; searchIndex < privilegeNames.size();
              searchIndex++)
@@ -116,19 +117,6 @@
     }
 
     /**
-     * @brief Sets given privilege in the bitset
-     *
-     * @param[in] privilege  Privilege to be set
-     *
-     * @return               None
-     *
-     */
-    bool setSinglePrivilege(const std::string& privilege)
-    {
-        return setSinglePrivilege(privilege.c_str());
-    }
-
-    /**
      * @brief Resets the given privilege in the bitset
      *
      * @param[in] privilege  Privilege to be reset
@@ -159,10 +147,10 @@
      * the setSinglePrivilege is called, or the Privilege structure is destroyed
      *
      */
-    std::vector<const std::string*>
+    std::vector<std::string>
         getActivePrivilegeNames(const PrivilegeType type) const
     {
-        std::vector<const std::string*> activePrivileges;
+        std::vector<std::string> activePrivileges;
 
         size_t searchIndex = 0;
         size_t endIndex = basePrivilegeCount;
@@ -176,7 +164,7 @@
         {
             if (privilegeBitset.test(searchIndex))
             {
-                activePrivileges.emplace_back(&privilegeNames[searchIndex]);
+                activePrivileges.emplace_back(privilegeNames[searchIndex]);
             }
         }