]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
src: fix NDEBUG typo 64188/head
authorMatan Breizman <mbreizma@redhat.com>
Mon, 26 May 2025 14:26:44 +0000 (14:26 +0000)
committerMatan Breizman <mbreizma@redhat.com>
Wed, 25 Jun 2025 16:42:40 +0000 (19:42 +0300)
_NDEBUG is a typo for NDEBUG. Possibly confused with _DEBUG which is a
Visual Studio concept.
Include other instances as well in the repo.

Fixes: https://tracker.ceph.com/issues/71456
Signed-off-by: Matan Breizman <mbreizma@redhat.com>
(cherry picked from commit 36569bd2d4280640da4a950d5f5c9e0090c085a5)

src/crimson/osd/lsan_suppressions.cc
src/include/function2.hpp
src/osd/ReplicatedBackend.cc

index 53b7eb6300d1023793d1d01d51d223918a662928..3f452587af4b4ab98a6c13c06c520f8013df00c3 100644 (file)
@@ -1,4 +1,4 @@
-#ifndef _NDEBUG
+#ifndef NDEBUG
 // The callbacks we define here will be called from the sanitizer runtime, but
 // aren't referenced from the Chrome executable. We must ensure that those
 // callbacks are not sanitizer-instrumented, and that they aren't stripped by
@@ -17,4 +17,4 @@ static char kLSanDefaultSuppressions[] =
 SANITIZER_HOOK_ATTRIBUTE const char *__lsan_default_suppressions() {
   return kLSanDefaultSuppressions;
 }
-#endif // ! _NDEBUG
+#endif // !NDEBUG
index 613e651c73c3cfb36571308476bae20b5ab1bc60..5419e143496db11d7586002e9a22a4589c46a046 100644 (file)
@@ -756,7 +756,7 @@ class vtable<property<IsThrowing, HasStrongExceptGuarantee, FormalArgs...>> {
             // Just swap both pointers if we allocated on the heap
             to->ptr_ = from->ptr_;
 
-#ifndef _NDEBUG
+#ifndef NDEBUG
             // We don't need to null the pointer since we know that
             // we don't own the data anymore through the vtable
             // which is set to empty.
index 7e3c1fc956dc4dc36e745c07a1c293437a9f2c60..d4acff869e482f82a5ee9c2b6d3f864b17914906 100644 (file)
@@ -728,7 +728,7 @@ static uint32_t crc32_netstring(const uint32_t orig_crc, std::string_view data)
   auto crc = ceph_crc32c(orig_crc, (unsigned char*)&len, sizeof(len));
   crc = ceph_crc32c(crc, (unsigned char*)data.data(), data.length());
 
-#ifndef _NDEBUG
+#ifndef NDEBUG
   // let's verify the compatibility but, due to performance penalty,
   // only in debug builds.
   ceph::bufferlist bl;