diff --git a/src/core/coap/coap_header.cpp b/src/core/coap/coap_header.cpp index 4114480ae..9ae90e6a9 100644 --- a/src/core/coap/coap_header.cpp +++ b/src/core/coap/coap_header.cpp @@ -170,7 +170,7 @@ otError Header::FromMessage(const Message &aMessage, uint16_t aMetadataSize) VerifyOrExit(mHeaderLength + optionLength <= length); aMessage.Read(offset, optionLength, mHeader.mBytes + mHeaderLength); - mHeaderLength += static_cast(optionLength); + mHeaderLength += optionLength; offset += optionLength; }