diff --git a/examples/platforms/nrf52811/radio.c b/examples/platforms/nrf52811/radio.c index 6cf53b368..c6ed570c7 100644 --- a/examples/platforms/nrf52811/radio.c +++ b/examples/platforms/nrf52811/radio.c @@ -86,8 +86,8 @@ static uint8_t sTransmitPsdu[OT_RADIO_FRAME_MAX_SIZE + 1]; #if OPENTHREAD_CONFIG_MAC_HEADER_IE_SUPPORT static otRadioIeInfo sTransmitIeInfo; +static otInstance * sInstance = NULL; #endif -static otInstance *sInstance = NULL; static otRadioFrame sAckFrame; static bool sAckedWithFramePending; @@ -283,7 +283,11 @@ otError otPlatRadioEnable(otInstance *aInstance) { otError error; +#if !OPENTHREAD_CONFIG_MAC_HEADER_IE_SUPPORT + OT_UNUSED_VARIABLE(aInstance); +#else sInstance = aInstance; +#endif if (sDisabled) { diff --git a/examples/platforms/nrf52840/radio.c b/examples/platforms/nrf52840/radio.c index 686789264..c90b3b159 100644 --- a/examples/platforms/nrf52840/radio.c +++ b/examples/platforms/nrf52840/radio.c @@ -86,8 +86,8 @@ static uint8_t sTransmitPsdu[OT_RADIO_FRAME_MAX_SIZE + 1]; #if OPENTHREAD_CONFIG_MAC_HEADER_IE_SUPPORT static otRadioIeInfo sTransmitIeInfo; +static otInstance * sInstance = NULL; #endif -static otInstance *sInstance = NULL; static otRadioFrame sAckFrame; static bool sAckedWithFramePending; @@ -283,7 +283,11 @@ otError otPlatRadioEnable(otInstance *aInstance) { otError error; +#if !OPENTHREAD_CONFIG_MAC_HEADER_IE_SUPPORT + OT_UNUSED_VARIABLE(aInstance); +#else sInstance = aInstance; +#endif if (sDisabled) {