From ba826ffb2ac7e2d366ebd553b92a912434ff603d Mon Sep 17 00:00:00 2001 From: Jonathan Hui Date: Fri, 4 Nov 2022 16:34:37 -0700 Subject: [PATCH] [clang-tidy] add `readability-redundant-control-flow` (#8365) --- script/make-pretty | 1 + src/core/thread/dua_manager.cpp | 2 -- src/core/thread/link_metrics.cpp | 1 - src/core/thread/network_diagnostic.cpp | 1 - 4 files changed, 1 insertion(+), 4 deletions(-) diff --git a/script/make-pretty b/script/make-pretty index 0483f7abc..aeae031ff 100755 --- a/script/make-pretty +++ b/script/make-pretty @@ -144,6 +144,7 @@ readability-avoid-const-params-in-decls,\ readability-else-after-return,\ readability-inconsistent-declaration-parameter-name,\ readability-make-member-function-const,\ +readability-redundant-control-flow,\ readability-redundant-member-init,\ readability-simplify-boolean-expr,\ readability-static-accessed-through-instance,\ diff --git a/src/core/thread/dua_manager.cpp b/src/core/thread/dua_manager.cpp index fd35ee0cf..2cc7c5e51 100644 --- a/src/core/thread/dua_manager.cpp +++ b/src/core/thread/dua_manager.cpp @@ -767,8 +767,6 @@ void DuaManager::UpdateChildDomainUnicastAddress(const Child &aChild, Mle::Child mChildDuaMask.Set(childIndex, true); mChildDuaRegisteredMask.Set(childIndex, false); } - - return; } #endif // OPENTHREAD_FTD && OPENTHREAD_CONFIG_TMF_PROXY_DUA_ENABLE diff --git a/src/core/thread/link_metrics.cpp b/src/core/thread/link_metrics.cpp index 66c39f3f8..c0bf8148f 100644 --- a/src/core/thread/link_metrics.cpp +++ b/src/core/thread/link_metrics.cpp @@ -499,7 +499,6 @@ void LinkMetrics::HandleReport(const Message & aMessage, exit: LogDebg("HandleReport, error:%s", ErrorToString(error)); - return; } Error LinkMetrics::HandleLinkProbe(const Message &aMessage, uint8_t &aSeriesId) diff --git a/src/core/thread/network_diagnostic.cpp b/src/core/thread/network_diagnostic.cpp index 1d3ae9162..5d5f97fa2 100644 --- a/src/core/thread/network_diagnostic.cpp +++ b/src/core/thread/network_diagnostic.cpp @@ -163,7 +163,6 @@ exit: { LogDebg("Received diagnostic get response, error = %s", ErrorToString(aResult)); } - return; } template <>