[assert] fix set-but-unused warnings (#10823)

This commit is contained in:
Jonathan Hui
2024-10-11 18:16:05 -07:00
committed by GitHub
parent 43a73a1cac
commit 987eaf5d2d
2 changed files with 6 additions and 0 deletions
+2
View File
@@ -719,6 +719,8 @@ void MlrManager::CheckInvariants(void) const
#if OPENTHREAD_EXAMPLES_SIMULATION && OPENTHREAD_CONFIG_ASSERT_ENABLE
uint16_t registeringNum = 0;
OT_UNUSED_VARIABLE(registeringNum);
OT_ASSERT(!mMlrPending || mSendDelay == 0);
#if OPENTHREAD_CONFIG_MLR_ENABLE
+4
View File
@@ -784,6 +784,8 @@ otError Buffer::OutFrameRemove(void)
uint8_t numSegments;
FrameTag tag;
OT_UNUSED_VARIABLE(numSegments);
EXPECT(!IsEmpty(), error = OT_ERROR_NOT_FOUND);
OutFrameSelectReadDirection();
@@ -884,6 +886,8 @@ uint16_t Buffer::OutFrameGetLength(void)
otMessage *message = nullptr;
#endif
OT_UNUSED_VARIABLE(numSegments);
// If the frame length was calculated before, return the previously calculated length.
EXPECT(mReadFrameLength == kUnknownFrameLength, frameLength = mReadFrameLength);