From 10a0a65f71ec3c0a737bb53d2e8c48b2c8a0c8b3 Mon Sep 17 00:00:00 2001 From: Yakun Xu Date: Tue, 7 Jan 2025 00:53:28 +0800 Subject: [PATCH] [mle] fix warning of maybe-uninitialied tlvType (#11114) --- src/core/thread/mle.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/core/thread/mle.cpp b/src/core/thread/mle.cpp index 7831ee7a5..a2d670567 100644 --- a/src/core/thread/mle.cpp +++ b/src/core/thread/mle.cpp @@ -34,6 +34,7 @@ #include "mle.hpp" #include "instance/instance.hpp" +#include "openthread/platform/toolchain.h" #include "utils/static_counter.hpp" namespace ot { @@ -5293,6 +5294,8 @@ Error Mle::TxMessage::AppendDatasetTlv(MeshCoP::Dataset::Type aDatasetType) error = Get().Read(dataset); tlvType = Tlv::kPendingDataset; break; + default: + OT_ASSERT(false); } if (error != kErrorNone)