Enable reinterpre_cast checks
We seem to use reinterpret cast in a few cases unfortunately. For the
moment, simply ignore most of them, and make it so we don't get more.
Signed-off-by: Ed Tanous <edtanous@google.com>
Change-Id: Ic860cf922576b18cdc8d51d6132f5a9cbcc1d9dc
diff --git a/http/http_connection.hpp b/http/http_connection.hpp
index 77886c5..840f2b6 100644
--- a/http/http_connection.hpp
+++ b/http/http_connection.hpp
@@ -98,9 +98,11 @@
{
adaptor.set_verify_mode(boost::asio::ssl::verify_peer);
std::string id = "bmcweb";
+
+ // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
+ auto* idC = reinterpret_cast<const unsigned char*>(id.c_str());
int ret = SSL_set_session_id_context(
- adaptor.native_handle(),
- reinterpret_cast<const unsigned char*>(id.c_str()),
+ adaptor.native_handle(), idC,
static_cast<unsigned int>(id.length()));
if (ret == 0)
{