Skip to content

OpenVINO™ is an open source toolkit for optimizing and deploying AI inference

[Core] Suppress coverity issue in hsm::Section::read() (#40116)

Tomasz Jankowski2585d708aaad
diff --git a/src/inference/src/dev/hsm_reader.cpp b/src/inference/src/dev/hsm_reader.cpp
index 8cebd66539d..468eaa20b42 100644
--- a/src/inference/src/dev/hsm_reader.cpp
+++ b/src/inference/src/dev/hsm_reader.cpp
@@ -40,6 +40,9 @@ bool Section::read(size_t offset, size_t length, void* destination) const noexce
std::memcpy(destination, m_entry.inline_bytes.data() + offset, length);
return true;
} else {
+ // m_source's alternatives are all nothrow-constructible and m_source is only ever set once via a constructor
+ // init-list, never reassigned - valueless_by_exception() is unreachable.
+ // coverity[UNCAUGHT_EXCEPT:FALSE]
return std::visit(ov::util::VariantVisitor{
[](const auto&) {
return false;