diff options
author | Ed Tanous <edtanous@google.com> | 2021-06-21 18:27:45 +0300 |
---|---|---|
committer | Ed Tanous <ed@tanous.net> | 2021-07-13 21:54:54 +0300 |
commit | 4f48d5f67f293e50340e7f4bf866435e03a6fc62 (patch) | |
tree | a18e9b9826fadb48721f700e2cfa749879ecce15 /redfish-core/lib/redfish_sessions.hpp | |
parent | 83fd8e19867f43f3a175d1ede65ad8636da553b3 (diff) | |
download | bmcweb-4f48d5f67f293e50340e7f4bf866435e03a6fc62.tar.xz |
Make code compile with clang-13
Clang-13 rightfully warns that the hasWebuiRoute variable isn't declared
as static. This commit resolves that, and adds the static keyword so it
can be used in multiple compile units. It also adds the static keyword
to the privilege registry, and the inline keyword to many methods that
now need it.
clang-format is also updated to version 12 in parse_registies.py, as
that's what CI uses, and what most people have installed.
Tested:
Followed clang-tidy instructions in README.md
"bitbake bmcweb" step now succeeds.
Signed-off-by: Ed Tanous <edtanous@google.com>
Change-Id: Id43b13606754cb37a404799fce155599ac3a3240
Diffstat (limited to 'redfish-core/lib/redfish_sessions.hpp')
-rw-r--r-- | redfish-core/lib/redfish_sessions.hpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/redfish-core/lib/redfish_sessions.hpp b/redfish-core/lib/redfish_sessions.hpp index 472151a5d9..929e0c8cb7 100644 --- a/redfish-core/lib/redfish_sessions.hpp +++ b/redfish-core/lib/redfish_sessions.hpp @@ -26,8 +26,8 @@ namespace redfish class SessionCollection; -void fillSessionObject(crow::Response& res, - const persistent_data::UserSession& session) +inline void fillSessionObject(crow::Response& res, + const persistent_data::UserSession& session) { res.jsonValue["Id"] = session.uniqueId; res.jsonValue["UserName"] = session.username; @@ -93,7 +93,7 @@ inline void requestRoutesSession(App& app) redfish::getUserPrivileges(req.userRole); if (!effectiveUserPrivileges.isSupersetOf( - {{"ConfigureUsers"}})) + {"ConfigureUsers"})) { messages::insufficientPrivilege(asyncResp->res); return; |