Enable checks for pointer arithmetic
Quite a few places we've disobeyed this rule, so simply ignore them for
now to avoid new issues popping up.
Signed-off-by: Ed Tanous <edtanous@google.com>
Change-Id: I3e518a8e8742279afb3ad1a9dad54006ed109fb1
diff --git a/http/http_connection.hpp b/http/http_connection.hpp
index 840f2b6..ad6855f 100644
--- a/http/http_connection.hpp
+++ b/http/http_connection.hpp
@@ -182,11 +182,13 @@
for (int i = 0; i < usage->length; i++)
{
- if (KU_DIGITAL_SIGNATURE & usage->data[i])
+ // NOLINTNEXTLINE(cppcoreguidelines-pro-bounds-pointer-arithmetic)
+ unsigned char usageChar = usage->data[i];
+ if (KU_DIGITAL_SIGNATURE & usageChar)
{
isKeyUsageDigitalSignature = true;
}
- if (KU_KEY_AGREEMENT & usage->data[i])
+ if (KU_KEY_AGREEMENT & usageChar)
{
isKeyUsageKeyAgreement = true;
}