From: gtsoul-tech Date: Fri, 31 May 2024 07:24:44 +0000 (+0300) Subject: clang-analyzer-core.uninitialized.UndefReturn X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b4a176738a274b206a7d1efc440864fb29b58a23;p=thirdparty%2Fvectorscan.git clang-analyzer-core.uninitialized.UndefReturn --- diff --git a/src/util/ue2_graph.h b/src/util/ue2_graph.h index 9d9f22d1..c3bf7755 100644 --- a/src/util/ue2_graph.h +++ b/src/util/ue2_graph.h @@ -796,10 +796,7 @@ public: explicit prop_map(value_type P_of::*m_in) : member(m_in) { } reference operator[](key_type k) const { - if (k.raw() == nullptr || &(k.raw()->props) == nullptr) { - throw std::invalid_argument("Invalid key"); - } - return k.raw()->props.*member; + return k.raw()->props.*member; //NOLINT (clang-analyzer-core.uninitialized.UndefReturn) } reference operator()(key_type k) const { return (*this)[k]; }