From 64accde7bdbe4e850305fae036697944bec029ec Mon Sep 17 00:00:00 2001 From: Saulius Valatka Date: Thu, 5 Jan 2023 13:56:55 +0200 Subject: [PATCH] check for null CQEs to silence clang-analyzer --- src/Disks/IO/IOUringReader.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/Disks/IO/IOUringReader.cpp b/src/Disks/IO/IOUringReader.cpp index 01eb84fd2eb..417b25d6f64 100644 --- a/src/Disks/IO/IOUringReader.cpp +++ b/src/Disks/IO/IOUringReader.cpp @@ -230,6 +230,12 @@ void IOUringReader::monitorRing() break; } + if (!cqe) + { + LOG_ERROR(log, "Unexpectedly got a null CQE, continuing"); + continue; + } + // it is safe to re-submit events once we take the lock here std::unique_lock lock{mutex};