mirror of
https://github.com/espressif/openthread.git
synced 2026-08-15 23:27:47 +00:00
[coap] enum type conversion to int in otCoapBlockSizeFromExponent (#4631)
This commit fixes an "enumerated type mixed with another enumerated type" error during IAR compilation.
This commit is contained in:
@@ -112,7 +112,8 @@ otError otCoapMessageAppendUriPathOptions(otMessage *aMessage, const char *aUriP
|
||||
|
||||
uint16_t otCoapBlockSizeFromExponent(otCoapBlockSize aSize)
|
||||
{
|
||||
return static_cast<uint16_t>(1 << (aSize + Coap::Message::kBlockSzxBase));
|
||||
return static_cast<uint16_t>(
|
||||
1 << (static_cast<uint8_t>(aSize) + static_cast<uint8_t>(Coap::Message::kBlockSzxBase)));
|
||||
}
|
||||
|
||||
otError otCoapMessageAppendBlock2Option(otMessage *aMessage, uint32_t aNum, bool aMore, otCoapBlockSize aSize)
|
||||
|
||||
Reference in New Issue
Block a user