summaryrefslogtreecommitdiff
path: root/redfish-core
diff options
context:
space:
mode:
authorEd Tanous <edtanous@google.com>2022-01-07 20:36:26 +0300
committerEd Tanous <ed@tanous.net>2022-01-12 22:00:37 +0300
commit4ecc618ff610fd9044d6067b764570135b243c4b (patch)
tree571086aaa0be8d392daf6d634d9a6d3066a21725 /redfish-core
parent9b6ffca5c1cafcc5406cf835390153a370dec4f6 (diff)
downloadbmcweb-4ecc618ff610fd9044d6067b764570135b243c4b.tar.xz
Enable const_cast checks
const_cast is an anti pattern. There are a few places we need to do it for interacting with C APIs, so enable the checks, and ignore the existing uses. Signed-off-by: Ed Tanous <edtanous@google.com> Change-Id: If1748213992b97f5e3e04cf9b86a6fcafbb7cf06
Diffstat (limited to 'redfish-core')
-rw-r--r--redfish-core/lib/virtual_media.hpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/redfish-core/lib/virtual_media.hpp b/redfish-core/lib/virtual_media.hpp
index 00c3ecf5ae..f617f4a98f 100644
--- a/redfish-core/lib/virtual_media.hpp
+++ b/redfish-core/lib/virtual_media.hpp
@@ -501,6 +501,7 @@ inline bool
template <typename T>
static void secureCleanup(T& value)
{
+ // NOLINTNEXTLINE(cppcoreguidelines-pro-type-const-cast)
auto raw = const_cast<typename T::value_type*>(value.data());
explicit_bzero(raw, value.size() * sizeof(*raw));
}