]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
common/buffer: silent compiler warning
authorIgor Fedotov <igor.fedotov@croit.io>
Wed, 25 Oct 2023 16:46:56 +0000 (19:46 +0300)
committerIgor Fedotov <igor.fedotov@croit.io>
Wed, 25 Oct 2023 16:46:56 +0000 (19:46 +0300)
Signed-off-by: Igor Fedotov <igor.fedotov@croit.io>
src/common/buffer.cc

index b363b99573f682b75f8655408237ab488fa8306c..b464097928906635ccc567cd27c72cdd6418d37f 100644 (file)
@@ -827,8 +827,9 @@ static ceph::spinlock debug_lock;
   {
     length = std::min<size_t>(length, get_remaining());
     while (length > 0) {
-      const char *p;
+      const char *p = nullptr;
       size_t l = get_ptr_and_advance(length, &p);
+      ceph_assert(p);
       crc = ceph_crc32c(crc, (unsigned char*)p, l);
       length -= l;
     }