Skip to content

Commit cc0e135

Browse files
committed
MISRA fix
1 parent d89a9fa commit cc0e135

File tree

4 files changed

+11
-3
lines changed

4 files changed

+11
-3
lines changed

source/FreeRTOS_ARP.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -979,7 +979,7 @@ static BaseType_t prvFindCacheEntry( const MACAddress_t * pxMACAddress,
979979
if( pxEndPoint != NULL )
980980
{
981981
/* For multi-cast, use the first IPv4 end-point. */
982-
memcpy( pxMACAddress->ucBytes, pxEndPoint->xMACAddress.ucBytes, sizeof( pxMACAddress->ucBytes ) );
982+
( void ) memcpy( pxMACAddress->ucBytes, pxEndPoint->xMACAddress.ucBytes, sizeof( pxMACAddress->ucBytes ) );
983983
*( ppxEndPoint ) = pxEndPoint;
984984
eReturn = eARPCacheHit;
985985
}

source/FreeRTOS_DNS.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ const MACAddress_t xLLMNR_MacAddress = { { 0x01, 0x00, 0x5e, 0x00, 0x00, 0xfc }
6363
/** @brief The IPv6 link-scope multicast MAC address */
6464
const MACAddress_t xLLMNR_MacAddressIPv6 = { { 0x33, 0x33, 0x00, 0x01, 0x00, 0x03 } };
6565

66+
#if ( ( ipconfigUSE_LLMNR != 1 ) && ( ipconfigUSE_IPv6 != 0 ) )
6667
/** @brief The IPv6 link-scope multicast address */
6768
const IPv6_Address_t ipLLMNR_IP_ADDR_IPv6 =
6869
{
@@ -77,13 +78,15 @@ const IPv6_Address_t ipLLMNR_IP_ADDR_IPv6 =
7778
0x00, 0x03,
7879
}
7980
};
81+
#endif /* ( ( ipconfigUSE_LLMNR != 1 ) && ( ipconfigUSE_IPv6 != 0 ) ) */
8082

8183
/** @brief The MAC address used for MDNS. */
8284
const MACAddress_t xMDNS_MacAddress = { { 0x01, 0x00, 0x5e, 0x00, 0x00, 0xfb } };
8385

8486
/** @brief The IPv6 multicast DNS MAC address. */
8587
const MACAddress_t xMDNS_MacAddressIPv6 = { { 0x33, 0x33, 0x00, 0x00, 0x00, 0xFB } };
8688

89+
#if ( ( ipconfigUSE_MDNS != 1 ) && ( ipconfigUSE_IPv6 != 0 ) )
8790
/** @brief multicast DNS IPv6 address */
8891
const IPv6_Address_t ipMDNS_IP_ADDR_IPv6 =
8992
{
@@ -98,6 +101,7 @@ const IPv6_Address_t ipMDNS_IP_ADDR_IPv6 =
98101
0x00, 0xfb,
99102
}
100103
};
104+
#endif /* ( ( ipconfigUSE_MDNS != 1 ) && ( ipconfigUSE_IPv6 != 0 ) ) */
101105

102106
/* Exclude the entire file if DNS is not enabled. */
103107
#if ( ipconfigUSE_DNS != 0 )

source/FreeRTOS_IP.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,8 @@ static void prvIPTask( void * pvParameters )
223223
{
224224
prvProcessIPEventsAndTimers();
225225
}
226+
227+
return;
226228
}
227229
/*-----------------------------------------------------------*/
228230

@@ -982,7 +984,7 @@ BaseType_t FreeRTOS_IPInit_Multi( void )
982984
{
983985
static StaticTask_t xIPTaskBuffer;
984986
static StackType_t xIPTaskStack[ ipconfigIP_TASK_STACK_SIZE_WORDS ];
985-
xIPTaskHandle = xTaskCreateStatic( prvIPTask,
987+
xIPTaskHandle = xTaskCreateStatic( &prvIPTask,
986988
"IP-Task",
987989
ipconfigIP_TASK_STACK_SIZE_WORDS,
988990
NULL,
@@ -997,7 +999,7 @@ BaseType_t FreeRTOS_IPInit_Multi( void )
997999
}
9981000
#else /* if ( configSUPPORT_STATIC_ALLOCATION == 1 ) */
9991001
{
1000-
xReturn = xTaskCreate( prvIPTask,
1002+
xReturn = xTaskCreate( &prvIPTask,
10011003
"IP-task",
10021004
ipconfigIP_TASK_STACK_SIZE_WORDS,
10031005
NULL,

source/include/FreeRTOS_DNS.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,10 @@ extern const MACAddress_t xLLMNR_MacAddress;
4747
/* The LLMNR IPv6 MAC address is 33:33:00:01:00:03 */
4848
extern const MACAddress_t xLLMNR_MacAddressIPv6;
4949

50+
#if ( ( ipconfigUSE_LLMNR != 1 ) && ( ipconfigUSE_IPv6 != 0 ) )
5051
/* The LLMNR IPv6 address is ff02::1:3 */
5152
extern const IPv6_Address_t ipLLMNR_IP_ADDR_IPv6;
53+
#endif /* ( ( ipconfigUSE_LLMNR != 1 ) && ( ipconfigUSE_IPv6 != 0 ) ) */
5254

5355
/* The MDNS MAC address is 01:00:5e:00:00:fc */
5456
extern const MACAddress_t xMDNS_MacAddress;

0 commit comments

Comments
 (0)