From bded2cc885b8412cdd30b7d7ef8c0cb166134287 Mon Sep 17 00:00:00 2001 From: Yakun Xu Date: Fri, 19 Dec 2025 08:59:35 +0800 Subject: [PATCH] [style] use OT_FALL_THROUGH (#12226) This commit replaces `// Fall through` with `OT_FALL_THROUGH` because the former is not recognized by some compilers. --- src/core/coap/coap.cpp | 2 +- src/core/net/srp_client.cpp | 4 ++-- src/ncp/ncp_base_ftd.cpp | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/core/coap/coap.cpp b/src/core/coap/coap.cpp index 549eab93b..34f7391c3 100644 --- a/src/core/coap/coap.cpp +++ b/src/core/coap/coap.cpp @@ -1424,7 +1424,7 @@ void CoapBase::ProcessReceivedRequest(Message &aMessage, const Ip6::MessageInfo { case kErrorNone: resource.HandleRequest(aMessage, aMessageInfo); - // Fall through + OT_FALL_THROUGH; case kErrorBusy: error = kErrorNone; break; diff --git a/src/core/net/srp_client.cpp b/src/core/net/srp_client.cpp index a72b6d88a..f0a03a53b 100644 --- a/src/core/net/srp_client.cpp +++ b/src/core/net/srp_client.cpp @@ -2065,7 +2065,7 @@ void Client::UpdateState(void) mHostInfo.SetState(kToRefresh); - // Fall through + OT_FALL_THROUGH; case kToAdd: case kToRefresh: @@ -2075,7 +2075,7 @@ void Client::UpdateState(void) // for empty service list. VerifyOrExit(!mServices.IsEmpty() && (mHostInfo.IsAutoAddressEnabled() || (mHostInfo.GetNumAddresses() > 0))); - // Fall through + OT_FALL_THROUGH; case kToRemove: shouldUpdate = true; diff --git a/src/ncp/ncp_base_ftd.cpp b/src/ncp/ncp_base_ftd.cpp index 183443303..33c4706cd 100644 --- a/src/ncp/ncp_base_ftd.cpp +++ b/src/ncp/ncp_base_ftd.cpp @@ -483,7 +483,7 @@ template <> otError NcpBase::HandlePropertySet