diff --git a/tests/unit/test_spinel_prop_codec.cpp b/tests/unit/test_spinel_prop_codec.cpp index 19f76526a..2506f9438 100644 --- a/tests/unit/test_spinel_prop_codec.cpp +++ b/tests/unit/test_spinel_prop_codec.cpp @@ -51,7 +51,7 @@ void TestDnssd(void) Spinel::Decoder decoder; uint8_t header; unsigned int command; - spinel_prop_key_t propKey; + unsigned int propKey; otError error = OT_ERROR_NONE; // Test DnssdHost encoding and decoding @@ -80,7 +80,7 @@ void TestDnssd(void) SuccessOrQuit(error = decoder.ReadUintPacked(command)); VerifyOrQuit(command == SPINEL_CMD_PROP_VALUE_INSERTED); SuccessOrQuit(error = decoder.ReadUintPacked(propKey)); - VerifyOrQuit(propKey == SPINEL_PROP_DNSSD_HOST); + VerifyOrQuit(static_cast(propKey) == SPINEL_PROP_DNSSD_HOST); SuccessOrQuit(error = DecodeDnssdHost(decoder, dnssdHostDecode, requestId, callbackData, callbackDataLen)); VerifyOrQuit(strcmp(dnssdHostDecode.mHostName, dnssdHostEncode.mHostName) == 0); VerifyOrQuit(dnssdHostDecode.mAddressesLength == dnssdHostEncode.mAddressesLength); @@ -121,7 +121,7 @@ void TestDnssd(void) SuccessOrQuit(error = decoder.ReadUintPacked(command)); VerifyOrQuit(command == SPINEL_CMD_PROP_VALUE_INSERTED); SuccessOrQuit(error = decoder.ReadUintPacked(propKey)); - VerifyOrQuit(propKey == SPINEL_PROP_DNSSD_SERVICE); + VerifyOrQuit(static_cast(propKey) == SPINEL_PROP_DNSSD_SERVICE); const char *dnssdSubTypeDecode[] = {nullptr, nullptr, nullptr}; uint16_t dnssdSubTypeCount = sizeof(dnssdSubTypeDecode) / sizeof(dnssdSubTypeDecode[0]); SuccessOrQuit(error = DecodeDnssdService(decoder, dnssdServiceDecode, dnssdSubTypeDecode, dnssdSubTypeCount, @@ -167,7 +167,7 @@ void TestDnssd(void) SuccessOrQuit(error = decoder.ReadUintPacked(command)); VerifyOrQuit(command == SPINEL_CMD_PROP_VALUE_INSERTED); SuccessOrQuit(error = decoder.ReadUintPacked(propKey)); - VerifyOrQuit(propKey == SPINEL_PROP_DNSSD_KEY_RECORD); + VerifyOrQuit(static_cast(propKey) == SPINEL_PROP_DNSSD_KEY_RECORD); SuccessOrQuit(error = DecodeDnssdKey(decoder, dnssdKeyDecode, requestId, callbackData, callbackDataLen)); VerifyOrQuit(strcmp(dnssdKeyDecode.mName, dnssdKeyEncode.mName) == 0); VerifyOrQuit(dnssdKeyDecode.mServiceType == dnssdKeyEncode.mServiceType);