summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEd Tanous <edtanous@google.com>2022-01-07 20:37:55 +0300
committerEd Tanous <ed@tanous.net>2022-01-12 22:00:37 +0300
commit4bac4a89b2739caf9bb250327757c44dd5f35c16 (patch)
tree944282c5584b99db9ce85aa860b74683daa37883
parent4ecc618ff610fd9044d6067b764570135b243c4b (diff)
downloadbmcweb-4bac4a89b2739caf9bb250327757c44dd5f35c16.tar.xz
Enable pro-type-cstyle-cast checks
We actually do a pretty good job of this, and only have one C style cast, that's part of an openssl macro, so ignore the one, and enable the checks. Signed-off-by: Ed Tanous <edtanous@google.com> Change-Id: Ie0462ee947c8310457365ba2aeea78caedb93da1
-rw-r--r--.clang-tidy1
-rw-r--r--http/http_connection.hpp5
2 files changed, 4 insertions, 2 deletions
diff --git a/.clang-tidy b/.clang-tidy
index 462c5bf4af..93db92207d 100644
--- a/.clang-tidy
+++ b/.clang-tidy
@@ -207,6 +207,7 @@ cppcoreguidelines-macro-usage,
cppcoreguidelines-pro-bounds-array-to-pointer-decay,
cppcoreguidelines-pro-bounds-pointer-arithmetic,
cppcoreguidelines-pro-type-const-cast,
+cppcoreguidelines-pro-type-cstyle-cast,
cppcoreguidelines-pro-type-member-init,
cppcoreguidelines-pro-type-reinterpret-cast,
cppcoreguidelines-special-member-functions,
diff --git a/http/http_connection.hpp b/http/http_connection.hpp
index ad6855f434..84f5c18ece 100644
--- a/http/http_connection.hpp
+++ b/http/http_connection.hpp
@@ -219,8 +219,9 @@ class Connection :
bool isExKeyUsageClientAuth = false;
for (int i = 0; i < sk_ASN1_OBJECT_num(extUsage); i++)
{
- if (NID_client_auth ==
- OBJ_obj2nid(sk_ASN1_OBJECT_value(extUsage, i)))
+ // NOLINTNEXTLINE(cppcoreguidelines-pro-type-cstyle-cast)
+ int nid = OBJ_obj2nid(sk_ASN1_OBJECT_value(extUsage, i));
+ if (NID_client_auth == nid)
{
isExKeyUsageClientAuth = true;
break;