diff --git a/examples/platforms/simulation/platform-simulation.h b/examples/platforms/simulation/platform-simulation.h index dfa43b65f..f9e7f9810 100644 --- a/examples/platforms/simulation/platform-simulation.h +++ b/examples/platforms/simulation/platform-simulation.h @@ -99,10 +99,10 @@ void platformAlarmInit(uint32_t aSpeedUpFactor); /** * This function retrieves the time remaining until the alarm fires. * - * @param[out] aTimeval A pointer to the timeval struct. + * @param[out] aTimeout A pointer to the timeval struct. * */ -void platformAlarmUpdateTimeout(struct timeval *tv); +void platformAlarmUpdateTimeout(struct timeval *aTimeout); /** * This function performs alarm driver processing. diff --git a/examples/platforms/simulation/radio.c b/examples/platforms/simulation/radio.c index 6865a57d8..a1baca64f 100644 --- a/examples/platforms/simulation/radio.c +++ b/examples/platforms/simulation/radio.c @@ -241,13 +241,13 @@ void otPlatRadioSetExtendedAddress(otInstance *aInstance, const otExtAddress *aE ReverseExtAddress(&sExtAddress, aExtAddress); } -void otPlatRadioSetShortAddress(otInstance *aInstance, otShortAddress aAddress) +void otPlatRadioSetShortAddress(otInstance *aInstance, otShortAddress aShortAddress) { OT_UNUSED_VARIABLE(aInstance); assert(aInstance != NULL); - sShortAddress = aAddress; + sShortAddress = aShortAddress; } void otPlatRadioSetPromiscuous(otInstance *aInstance, bool aEnable) @@ -438,13 +438,13 @@ otError otPlatRadioReceive(otInstance *aInstance, uint8_t aChannel) return error; } -otError otPlatRadioTransmit(otInstance *aInstance, otRadioFrame *aRadio) +otError otPlatRadioTransmit(otInstance *aInstance, otRadioFrame *aFrame) { OT_UNUSED_VARIABLE(aInstance); - OT_UNUSED_VARIABLE(aRadio); + OT_UNUSED_VARIABLE(aFrame); assert(aInstance != NULL); - assert(aRadio != NULL); + assert(aFrame != NULL); otError error = OT_ERROR_INVALID_STATE; diff --git a/include/openthread/instance.h b/include/openthread/instance.h index 90a07e5e7..873edd32d 100644 --- a/include/openthread/instance.h +++ b/include/openthread/instance.h @@ -53,7 +53,7 @@ extern "C" { * @note This number versions both OpenThread platform and user APIs. * */ -#define OPENTHREAD_API_VERSION (45) +#define OPENTHREAD_API_VERSION (46) /** * @addtogroup api-instance diff --git a/include/openthread/thread.h b/include/openthread/thread.h index 389de0150..43ae7a601 100644 --- a/include/openthread/thread.h +++ b/include/openthread/thread.h @@ -831,7 +831,7 @@ typedef void (*otThreadDiscoveryRequestCallback)(const otThreadDiscoveryRequestI * @param[in] aContext A pointer to callback application-specific context. * */ -void otThreadSetDiscoveryRequestCallback(otInstance * aInstnace, +void otThreadSetDiscoveryRequestCallback(otInstance * aInstance, otThreadDiscoveryRequestCallback aCallback, void * aContext); diff --git a/script/make-pretty b/script/make-pretty index c5c6b1011..36c1afa3e 100755 --- a/script/make-pretty +++ b/script/make-pretty @@ -124,6 +124,7 @@ modernize-use-equals-default,\ modernize-use-equals-delete,\ modernize-use-nullptr,\ readability-avoid-const-params-in-decls,\ +readability-inconsistent-declaration-parameter-name,\ readability-make-member-function-const,\ readability-redundant-member-init,\ readability-simplify-boolean-expr,\ diff --git a/src/cli/cli.hpp b/src/cli/cli.hpp index 7331b96cd..39f369523 100644 --- a/src/cli/cli.hpp +++ b/src/cli/cli.hpp @@ -258,7 +258,7 @@ private: }; otError ParsePingInterval(const char *aString, uint32_t &aInterval); - static otError ParseJoinerDiscerner(char *aString, otJoinerDiscerner &aJoinerDiscerner); + static otError ParseJoinerDiscerner(char *aString, otJoinerDiscerner &aDiscerner); otError ProcessHelp(uint8_t aArgsLength, char *aArgs[]); otError ProcessCcaThreshold(uint8_t aArgsLength, char *aArgs[]); diff --git a/src/cli/cli_commissioner.hpp b/src/cli/cli_commissioner.hpp index dcdb6a7e3..fffa8df7a 100644 --- a/src/cli/cli_commissioner.hpp +++ b/src/cli/cli_commissioner.hpp @@ -102,11 +102,11 @@ private: static void HandleStateChanged(otCommissionerState aState, void *aContext); void HandleStateChanged(otCommissionerState aState); - static void HandleJoinerEvent(otCommissionerJoinerEvent aJoinerEvent, + static void HandleJoinerEvent(otCommissionerJoinerEvent aEvent, const otJoinerInfo * aJoinerInfo, const otExtAddress * aJoinerId, void * aContext); - void HandleJoinerEvent(otCommissionerJoinerEvent aJoinerEvent, + void HandleJoinerEvent(otCommissionerJoinerEvent aEvent, const otJoinerInfo * aJoinerInfo, const otExtAddress * aJoinerId); diff --git a/src/cli/cli_udp.hpp b/src/cli/cli_udp.hpp index 12c556dad..1fb446ddd 100644 --- a/src/cli/cli_udp.hpp +++ b/src/cli/cli_udp.hpp @@ -90,7 +90,7 @@ private: otError ProcessOpen(uint8_t aArgsLength, char *aArgs[]); otError ProcessSend(uint8_t aArgsLength, char *aArgs[]); otError ProcessLinkSecurity(uint8_t aArgsLength, char *aArgs[]); - otError WriteCharToBuffer(otMessage *aMessage, uint16_t aSize); + otError WriteCharToBuffer(otMessage *aMessage, uint16_t aMessageSize); static void HandleUdpReceive(void *aContext, otMessage *aMessage, const otMessageInfo *aMessageInfo); void HandleUdpReceive(otMessage *aMessage, const otMessageInfo *aMessageInfo); diff --git a/src/core/api/thread_ftd_api.cpp b/src/core/api/thread_ftd_api.cpp index 57424f885..712773872 100644 --- a/src/core/api/thread_ftd_api.cpp +++ b/src/core/api/thread_ftd_api.cpp @@ -274,27 +274,27 @@ otError otThreadGetChildInfoByIndex(otInstance *aInstance, uint16_t aChildIndex, otError otThreadGetChildNextIp6Address(otInstance * aInstance, uint16_t aChildIndex, - otChildIp6AddressIterator *aIterIndex, + otChildIp6AddressIterator *aIterator, otIp6Address * aAddress) { otError error = OT_ERROR_NONE; Instance & instance = *static_cast(aInstance); const Child *child; - OT_ASSERT(aIterIndex != nullptr && aAddress != nullptr); + OT_ASSERT(aIterator != nullptr && aAddress != nullptr); child = instance.Get().GetChildAtIndex(aChildIndex); VerifyOrExit(child != nullptr, error = OT_ERROR_INVALID_ARGS); VerifyOrExit(child->IsStateValidOrRestoring(), error = OT_ERROR_INVALID_ARGS); { - Child::AddressIterator iter(*child, *aIterIndex); + Child::AddressIterator iter(*child, *aIterator); VerifyOrExit(!iter.IsDone(), error = OT_ERROR_NOT_FOUND); *aAddress = *iter.GetAddress(); iter++; - *aIterIndex = iter.GetAsIndex(); + *aIterator = iter.GetAsIndex(); } exit: diff --git a/src/core/coap/coap_message.hpp b/src/core/coap/coap_message.hpp index 6852aa253..b8580bac1 100644 --- a/src/core/coap/coap_message.hpp +++ b/src/core/coap/coap_message.hpp @@ -1064,14 +1064,14 @@ public: /** * This method read the current Option Value which is assumed to be an unsigned integer. * - * @param[out] aValue A reference to `uint64_t` to output the read Option Value. + * @param[out] aUintValue A reference to `uint64_t` to output the read Option Value. * * @retval OT_ERROR_NONE Successfully read the Option value. * @retval OT_ERROR_NO_BUFS Value is too long to fit in an `uint64_t`. * @retval OT_ERROR_NOT_FOUND Iterator is done (not pointing to any option). * */ - otError ReadOptionValue(uint64_t &aValue) const; + otError ReadOptionValue(uint64_t &aUintValue) const; /** * This method gets the offset of beginning of the CoAP message payload (after the CoAP header). diff --git a/src/core/common/notifier.hpp b/src/core/common/notifier.hpp index 6b9eafa84..8456811f1 100644 --- a/src/core/common/notifier.hpp +++ b/src/core/common/notifier.hpp @@ -240,7 +240,7 @@ public: * @param[in] aEvent The event to signal. * */ - void SignalIfFirst(Event aFlags); + void SignalIfFirst(Event aEvent); /** * This method indicates whether or not an event signal callback is pending/scheduled. diff --git a/src/core/common/timer.hpp b/src/core/common/timer.hpp index e3bf7c27b..751eff188 100644 --- a/src/core/common/timer.hpp +++ b/src/core/common/timer.hpp @@ -176,7 +176,7 @@ public: * @param[in] aDelay The delay in milliseconds. It must not be longer than `kMaxDelay`. * */ - void StartAt(TimeMilli sStartTime, uint32_t aDelay); + void StartAt(TimeMilli aStartTime, uint32_t aDelay); /** * This method schedules the timer to fire at a given fire time. diff --git a/src/core/common/tlvs.cpp b/src/core/common/tlvs.cpp index f119744f0..46b30492d 100644 --- a/src/core/common/tlvs.cpp +++ b/src/core/common/tlvs.cpp @@ -184,16 +184,16 @@ template otError Tlv::ReadUintTlv(const Message &aMessage, uint16_t aOf template otError Tlv::ReadUintTlv(const Message &aMessage, uint16_t aOffset, uint16_t &aValue); template otError Tlv::ReadUintTlv(const Message &aMessage, uint16_t aOffset, uint32_t &aValue); -otError Tlv::ReadTlv(const Message &aMessage, uint16_t aOffset, void *aValue, uint8_t aLength) +otError Tlv::ReadTlv(const Message &aMessage, uint16_t aOffset, void *aValue, uint8_t aMinLength) { otError error = OT_ERROR_NONE; Tlv tlv; SuccessOrExit(error = aMessage.Read(aOffset, tlv)); - VerifyOrExit(!tlv.IsExtended() && (tlv.GetLength() >= aLength), error = OT_ERROR_PARSE); + VerifyOrExit(!tlv.IsExtended() && (tlv.GetLength() >= aMinLength), error = OT_ERROR_PARSE); VerifyOrExit(tlv.GetSize() + aOffset <= aMessage.GetLength(), error = OT_ERROR_PARSE); - aMessage.ReadBytes(aOffset + sizeof(Tlv), aValue, aLength); + aMessage.ReadBytes(aOffset + sizeof(Tlv), aValue, aMinLength); exit: return error; diff --git a/src/core/common/tlvs.hpp b/src/core/common/tlvs.hpp index 24472cfff..b1941d4a6 100644 --- a/src/core/common/tlvs.hpp +++ b/src/core/common/tlvs.hpp @@ -284,16 +284,19 @@ public: * * This method can be used independent of whether the read TLV (from message) is an Extended TLV or not. * - * @param[in] aMessage A reference to the message. - * @param[in] aType The Type value to search for. - * @param[out] aOffset The offset where the value starts. - * @param[out] aLength The length of the value. + * @param[in] aMessage A reference to the message. + * @param[in] aType The Type value to search for. + * @param[out] aValueOffset The offset where the value starts. + * @param[out] aLength The length of the value. * * @retval OT_ERROR_NONE Successfully found the TLV. * @retval OT_ERROR_NOT_FOUND Could not find the TLV with Type @p aType. * */ - static otError FindTlvValueOffset(const Message &aMessage, uint8_t aType, uint16_t &aOffset, uint16_t &aLength); + static otError FindTlvValueOffset(const Message &aMessage, + uint8_t aType, + uint16_t & aValueOffset, + uint16_t & aLength); /** * This static method searches for a TLV with a given type in a message, ensures its length is same or larger than @@ -465,7 +468,7 @@ private: static otError AppendTlv(Message &aMessage, uint8_t aType, const void *aValue, uint8_t aLength); template static otError ReadUintTlv(const Message &aMessage, uint16_t aOffset, UintType &aValue); - template static otError FindUintTlv(const Message &aMessage, uint8_t aTyle, UintType &aValue); + template static otError FindUintTlv(const Message &aMessage, uint8_t aType, UintType &aValue); template static otError AppendUintTlv(Message &aMessage, uint8_t aType, UintType aValue); uint8_t mType; diff --git a/src/core/mac/sub_mac.hpp b/src/core/mac/sub_mac.hpp index f3c641e93..db9155aef 100644 --- a/src/core/mac/sub_mac.hpp +++ b/src/core/mac/sub_mac.hpp @@ -585,7 +585,7 @@ private: void HandleReceiveDone(RxFrame *aFrame, otError aError); void HandleTransmitStarted(TxFrame &aFrame); - void HandleTransmitDone(TxFrame &aTxFrame, RxFrame *aAckFrame, otError aError); + void HandleTransmitDone(TxFrame &aFrame, RxFrame *aAckFrame, otError aError); void UpdateFrameCounterOnTxDone(const TxFrame &aFrame); void HandleEnergyScanDone(int8_t aMaxRssi); diff --git a/src/core/meshcop/commissioner.cpp b/src/core/meshcop/commissioner.cpp index 90ca3dabf..de01625aa 100644 --- a/src/core/meshcop/commissioner.cpp +++ b/src/core/meshcop/commissioner.cpp @@ -484,38 +484,38 @@ exit: return error; } -void Commissioner::Joiner::CopyToJoinerInfo(otJoinerInfo &aInfo) const +void Commissioner::Joiner::CopyToJoinerInfo(otJoinerInfo &aJoiner) const { - memset(&aInfo, 0, sizeof(aInfo)); + memset(&aJoiner, 0, sizeof(aJoiner)); switch (mType) { case kTypeAny: - aInfo.mType = OT_JOINER_INFO_TYPE_ANY; + aJoiner.mType = OT_JOINER_INFO_TYPE_ANY; break; case kTypeEui64: - aInfo.mType = OT_JOINER_INFO_TYPE_EUI64; - aInfo.mSharedId.mEui64 = mSharedId.mEui64; + aJoiner.mType = OT_JOINER_INFO_TYPE_EUI64; + aJoiner.mSharedId.mEui64 = mSharedId.mEui64; break; case kTypeDiscerner: - aInfo.mType = OT_JOINER_INFO_TYPE_DISCERNER; - aInfo.mSharedId.mDiscerner = mSharedId.mDiscerner; + aJoiner.mType = OT_JOINER_INFO_TYPE_DISCERNER; + aJoiner.mSharedId.mDiscerner = mSharedId.mDiscerner; break; case kTypeUnused: ExitNow(); } - aInfo.mPskd = mPskd; - aInfo.mExpirationTime = mExpirationTime - TimerMilli::GetNow(); + aJoiner.mPskd = mPskd; + aJoiner.mExpirationTime = mExpirationTime - TimerMilli::GetNow(); exit: return; } -otError Commissioner::GetNextJoinerInfo(uint16_t &aIterator, otJoinerInfo &aInfo) const +otError Commissioner::GetNextJoinerInfo(uint16_t &aIterator, otJoinerInfo &aJoinerInfo) const { otError error = OT_ERROR_NONE; @@ -525,7 +525,7 @@ otError Commissioner::GetNextJoinerInfo(uint16_t &aIterator, otJoinerInfo &aInfo if (joiner.mType != Joiner::kTypeUnused) { - joiner.CopyToJoinerInfo(aInfo); + joiner.CopyToJoinerInfo(aJoinerInfo); ExitNow(); } } diff --git a/src/core/meshcop/commissioner.hpp b/src/core/meshcop/commissioner.hpp index bd577c600..4bfde6537 100644 --- a/src/core/meshcop/commissioner.hpp +++ b/src/core/meshcop/commissioner.hpp @@ -365,13 +365,13 @@ private: JoinerPskd mPskd; Type mType; - void CopyToJoinerInfo(otJoinerInfo &aInfo) const; + void CopyToJoinerInfo(otJoinerInfo &aJoiner) const; }; Joiner *GetUnusedJoinerEntry(void); Joiner *FindJoinerEntry(const Mac::ExtAddress *aEui64); Joiner *FindJoinerEntry(const JoinerDiscerner &aDiscerner); - Joiner *FindBestMatchingJoinerEntry(const Mac::ExtAddress &aRxJoinerId); + Joiner *FindBestMatchingJoinerEntry(const Mac::ExtAddress &aReceivedJoinerId); void RemoveJoinerEntry(Joiner &aJoiner); otError AddJoiner(const Mac::ExtAddress *aEui64, diff --git a/src/core/meshcop/meshcop.cpp b/src/core/meshcop/meshcop.cpp index 282d44fec..6a0d52268 100644 --- a/src/core/meshcop/meshcop.cpp +++ b/src/core/meshcop/meshcop.cpp @@ -80,16 +80,16 @@ exit: return isEqual; } -bool JoinerPskd::IsPskdValid(const char *aPskString) +bool JoinerPskd::IsPskdValid(const char *aPskdString) { bool valid = false; - uint16_t pskdLength = StringLength(aPskString, kMaxLength + 1); + uint16_t pskdLength = StringLength(aPskdString, kMaxLength + 1); VerifyOrExit(pskdLength >= kMinLength && pskdLength <= kMaxLength); for (uint16_t i = 0; i < pskdLength; i++) { - char c = aPskString[i]; + char c = aPskdString[i]; VerifyOrExit(isdigit(c) || isupper(c)); VerifyOrExit(c != 'I' && c != 'O' && c != 'Q' && c != 'Z'); diff --git a/src/core/net/dhcp6_client.hpp b/src/core/net/dhcp6_client.hpp index 6246ad6d6..0f40b8e6e 100644 --- a/src/core/net/dhcp6_client.hpp +++ b/src/core/net/dhcp6_client.hpp @@ -110,7 +110,8 @@ private: void Start(void); void Stop(void); - static bool MatchNetifAddressWithPrefix(const Ip6::NetifUnicastAddress &aAddress, const Ip6::Prefix &aIp6Prefix); + static bool MatchNetifAddressWithPrefix(const Ip6::NetifUnicastAddress &aNetifAddress, + const Ip6::Prefix & aIp6Prefix); void Solicit(uint16_t aRloc16); diff --git a/src/core/thread/child_table.hpp b/src/core/thread/child_table.hpp index 493b8518a..dfc9055cb 100644 --- a/src/core/thread/child_table.hpp +++ b/src/core/thread/child_table.hpp @@ -234,24 +234,24 @@ public: * This method searches the child table for a `Child` with a given extended address also matching a given state * filter. * - * @param[in] aAddress A reference to an extended address. - * @param[in] aFilter A child state filter. + * @param[in] aExtAddress A reference to an extended address. + * @param[in] aFilter A child state filter. * * @returns A pointer to the `Child` entry if one is found, or `nullptr` otherwise. * */ - Child *FindChild(const Mac::ExtAddress &aAddress, Child::StateFilter aFilter); + Child *FindChild(const Mac::ExtAddress &aExtAddress, Child::StateFilter aFilter); /** * This method searches the child table for a `Child` with a given address also matching a given state filter. * - * @param[in] aAddress A reference to a MAC address. - * @param[in] aFilter A child state filter. + * @param[in] aMacAddress A reference to a MAC address. + * @param[in] aFilter A child state filter. * * @returns A pointer to the `Child` entry if one is found, or `nullptr` otherwise. * */ - Child *FindChild(const Mac::Address &aAddress, Child::StateFilter aFilter); + Child *FindChild(const Mac::Address &aMacAddress, Child::StateFilter aFilter); /** * This method indicates whether the child table contains any child matching a given state filter. @@ -375,7 +375,7 @@ public: * @retval FALSE If the child table does not contain any sleepy child with @p aIp6Address. * */ - bool HasSleepyChildWithAddress(const Ip6::Address &aIp6ddress) const; + bool HasSleepyChildWithAddress(const Ip6::Address &aIp6Address) const; private: enum diff --git a/src/core/thread/discover_scanner.hpp b/src/core/thread/discover_scanner.hpp index eccc08b3f..10a9d7890 100644 --- a/src/core/thread/discover_scanner.hpp +++ b/src/core/thread/discover_scanner.hpp @@ -124,7 +124,7 @@ public: bool aJoiner, bool aEnableFiltering, const FilterIndexes * aFilterIndexes, - Handler aHandler, + Handler aCallback, void * aContext); /** diff --git a/src/core/thread/mesh_forwarder.hpp b/src/core/thread/mesh_forwarder.hpp index caadddddc..8ae11d475 100644 --- a/src/core/thread/mesh_forwarder.hpp +++ b/src/core/thread/mesh_forwarder.hpp @@ -416,7 +416,7 @@ private: bool aAddMeshHeader = false, uint16_t aMeshSource = 0xffff, uint16_t aMeshDest = 0xffff); - void PrepareEmptyFrame(Mac::TxFrame &aFrame, const Mac::Address &aDstAddr, bool aAckRequest); + void PrepareEmptyFrame(Mac::TxFrame &aFrame, const Mac::Address &aMacDest, bool aAckRequest); void SendMesh(Message &aMessage, Mac::TxFrame &aFrame); void SendDestinationUnreachable(uint16_t aMeshSource, const Message &aMessage); diff --git a/src/core/thread/network_data.hpp b/src/core/thread/network_data.hpp index e8744cf89..38ad1735c 100644 --- a/src/core/thread/network_data.hpp +++ b/src/core/thread/network_data.hpp @@ -161,7 +161,7 @@ private: void SetFrom(Instance & aInstance, const PrefixTlv & aPrefixTlv, const HasRouteTlv & aHasRouteTlv, - const HasRouteEntry &aEntry); + const HasRouteEntry &aHasRouteEntry); }; /** diff --git a/src/core/thread/network_data_leader_ftd.hpp b/src/core/thread/network_data_leader_ftd.hpp index 98be24545..fe5657fdd 100644 --- a/src/core/thread/network_data_leader_ftd.hpp +++ b/src/core/thread/network_data_leader_ftd.hpp @@ -211,13 +211,13 @@ private: otError AddPrefix(const PrefixTlv &aPrefix, ChangedFlags &aChangedFlags); otError AddHasRoute(const HasRouteTlv &aHasRoute, PrefixTlv &aDstPrefix, ChangedFlags &aChangedFlags); - otError AddBorderRouter(const BorderRouterTlv &aBorderRouter, PrefixTlv &aDstPrefix, ChangedFlags &aFlags); + otError AddBorderRouter(const BorderRouterTlv &aBorderRouter, PrefixTlv &aDstPrefix, ChangedFlags &aChangedFlags); otError AddService(const ServiceTlv &aService, ChangedFlags &aChangedFlags); otError AddServer(const ServerTlv &aServer, ServiceTlv &aDstService, ChangedFlags &aChangedFlags); otError AllocateServiceId(uint8_t &aServiceId) const; - otError AllocateContextId(uint8_t &aConextId); + otError AllocateContextId(uint8_t &aContextId); void FreeContextId(uint8_t aContextId); void StartContextReuseTimer(uint8_t aContextId); void StopContextReuseTimer(uint8_t aContextId); diff --git a/src/core/utils/parse_cmdline.cpp b/src/core/utils/parse_cmdline.cpp index 2903afedb..c9008e300 100644 --- a/src/core/utils/parse_cmdline.cpp +++ b/src/core/utils/parse_cmdline.cpp @@ -84,14 +84,14 @@ exit: return error; } -otError ParseCmd(char *aString, uint8_t &aArgsLength, char *aArgs[], uint8_t aArgsLengthMax) +otError ParseCmd(char *aCommandString, uint8_t &aArgsLength, char *aArgs[], uint8_t aArgsLengthMax) { otError error = OT_ERROR_NONE; char * cmd; aArgsLength = 0; - for (cmd = aString; *cmd; cmd++) + for (cmd = aCommandString; *cmd; cmd++) { if ((*cmd == '\\') && IsEscapable(*(cmd + 1))) { diff --git a/tests/fuzz/fuzzer_platform.cpp b/tests/fuzz/fuzzer_platform.cpp index a2620446a..463a6d4de 100644 --- a/tests/fuzz/fuzzer_platform.cpp +++ b/tests/fuzz/fuzzer_platform.cpp @@ -258,10 +258,10 @@ void otPlatRadioSetExtendedAddress(otInstance *aInstance, const otExtAddress *aE OT_UNUSED_VARIABLE(aExtAddr); } -void otPlatRadioSetShortAddress(otInstance *aInstance, uint16_t aShortAddr) +void otPlatRadioSetShortAddress(otInstance *aInstance, uint16_t aShortAddress) { OT_UNUSED_VARIABLE(aInstance); - OT_UNUSED_VARIABLE(aShortAddr); + OT_UNUSED_VARIABLE(aShortAddress); } void otPlatRadioSetPromiscuous(otInstance *aInstance, bool aEnabled) diff --git a/tests/unit/test_platform.cpp b/tests/unit/test_platform.cpp index 035c2d34b..bf1d014dd 100644 --- a/tests/unit/test_platform.cpp +++ b/tests/unit/test_platform.cpp @@ -215,11 +215,11 @@ void otPlatRadioSetExtendedAddress(otInstance *aInstance, const otExtAddress *aE } } -void otPlatRadioSetShortAddress(otInstance *aInstance, uint16_t aShortAddr) +void otPlatRadioSetShortAddress(otInstance *aInstance, uint16_t aShortAddress) { if (g_testPlatRadioSetShortAddress) { - g_testPlatRadioSetShortAddress(aInstance, aShortAddr); + g_testPlatRadioSetShortAddress(aInstance, aShortAddress); } }