From: gtsoul-tech Date: Fri, 31 May 2024 07:24:44 +0000 (+0300) Subject: clang-analyzer-core.uninitialized.UndefReturn X-Git-Tag: vectorscan/5.4.12^2~27^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=00a5ff1c678d98af922621c275310a5e13f5e95f;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]; }