From 2bddd81ec420a885069fdbeb79d72931d04e6e17 Mon Sep 17 00:00:00 2001 From: Stefano Avallone Date: Sun, 12 May 2024 23:34:30 +0200 Subject: [PATCH] core: Initialize EnumValue::m_value Avoid UB errors (spotted by sanitizers) such as "runtime error: load of value 52428820, which is not a valid value for type 'WifiPhyBand' --- src/core/model/enum.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/model/enum.h b/src/core/model/enum.h index 454d5d0ef..464a7c039 100644 --- a/src/core/model/enum.h +++ b/src/core/model/enum.h @@ -73,7 +73,7 @@ class EnumValue : public AttributeValue bool DeserializeFromString(std::string value, Ptr checker) override; private: - T m_value; //!< The stored value. + T m_value{}; //!< The stored value. }; template