diff --git a/src/core/mac/data_poll_handler.cpp b/src/core/mac/data_poll_handler.cpp index 9e4e1b53f..f4d61eac8 100644 --- a/src/core/mac/data_poll_handler.cpp +++ b/src/core/mac/data_poll_handler.cpp @@ -272,12 +272,17 @@ void DataPollHandler::HandleSentFrame(const Mac::TxFrame &aFrame, Error aError, { uint32_t frameCounter; uint8_t keyId; + Error error; - IgnoreError(aFrame.GetFrameCounter(frameCounter)); + error = aFrame.GetFrameCounter(frameCounter); + OT_ASSERT(error == kErrorNone); aChild.SetIndirectFrameCounter(frameCounter); - IgnoreError(aFrame.GetKeyId(keyId)); + error = aFrame.GetKeyId(keyId); + OT_ASSERT(error == kErrorNone); aChild.SetIndirectKeyId(keyId); + + OT_UNUSED_VARIABLE(error); } ExitNow(); diff --git a/src/ncp/ncp_base_mtd.cpp b/src/ncp/ncp_base_mtd.cpp index 3793c8bf6..59312cfff 100644 --- a/src/ncp/ncp_base_mtd.cpp +++ b/src/ncp/ncp_base_mtd.cpp @@ -911,7 +911,7 @@ template <> otError NcpBase::HandlePropertySet