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/include/pam_authenticate.hpp b/include/pam_authenticate.hpp
index 0ce0bb4..1459ea6 100644
--- a/include/pam_authenticate.hpp
+++ b/include/pam_authenticate.hpp
@@ -24,6 +24,7 @@
for (int i = 0; i < numMsg; ++i)
{
/* Ignore all PAM messages except prompting for hidden input */
+ // NOLINTNEXTLINE(cppcoreguidelines-pro-bounds-pointer-arithmetic)
if (msg[i]->msg_style != PAM_PROMPT_ECHO_OFF)
{
continue;
@@ -66,6 +67,7 @@
// NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
*resp = reinterpret_cast<pam_response*>(ptr);
+ // NOLINTNEXTLINE(cppcoreguidelines-pro-bounds-pointer-arithmetic)
resp[i]->resp = pass;
return PAM_SUCCESS;