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/ibm/locks.hpp b/include/ibm/locks.hpp
index 4fbb503..5a86d09 100644
--- a/include/ibm/locks.hpp
+++ b/include/ibm/locks.hpp
@@ -535,9 +535,14 @@
     // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
     uint8_t* q = reinterpret_cast<uint8_t*>(&resourceId2);
 
-    BMCWEB_LOG_DEBUG << "Comparing bytes " << std::to_string(p[position]) << ","
-                     << std::to_string(q[position]);
-    if (p[position] != q[position])
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-bounds-pointer-arithmetic)
+    uint8_t pPosition = p[position];
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-bounds-pointer-arithmetic)
+    uint8_t qPosition = q[position];
+
+    BMCWEB_LOG_DEBUG << "Comparing bytes " << std::to_string(pPosition) << ","
+                     << std::to_string(qPosition);
+    if (pPosition != qPosition)
     {
         return false;
     }