Skip to content

Commit d389e8b

Browse files
authored
Fix TI CCS compiler errors (#1281)
* Fix ti compiller errors * Remove xLastUnsolicitedNDTime * Remove vNDSendUnsolicited in unit test and header * Apply formating changes
1 parent 60cfc13 commit d389e8b

File tree

7 files changed

+12
-43
lines changed

7 files changed

+12
-43
lines changed

source/FreeRTOS_DNS_Parser.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@
262262
uint16_t x;
263263
BaseType_t xReturn = pdTRUE;
264264
uint32_t ulIPAddress = 0U;
265-
BaseType_t xDNSHookReturn;
265+
BaseType_t xDNSHookReturn = 0U;
266266

267267
( void ) memset( &( xSet ), 0, sizeof( xSet ) );
268268
xSet.usPortNumber = usPort;

source/FreeRTOS_IPv4.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@
8282

8383
/* Map the buffer onto a IP-Packet struct to easily access the
8484
* fields of the IP packet. */
85-
const IPPacket_t * const pxIPPacket = ( ( const IPPacket_t * const ) pvEthernetBuffer );
85+
const IPPacket_t * const pxIPPacket = ( ( const IPPacket_t * ) pvEthernetBuffer );
8686

8787
DEBUG_DECLARE_TRACE_VARIABLE( BaseType_t, xLocation, 0 );
8888

source/FreeRTOS_IPv6.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,11 +99,11 @@ const struct xIPv6_Address FreeRTOS_in6addr_loopback = { { 0U, 0U, 0U, 0U, 0U, 0
9999
size_t uxMinimumLength;
100100
size_t uxExtHeaderLength = 0;
101101
const IPExtHeader_IPv6_t * pxExtHeader = NULL;
102-
const uint8_t * const pucEthernetBuffer = ( const uint8_t * const ) pvEthernetBuffer;
102+
const uint8_t * const pucEthernetBuffer = ( const uint8_t * ) pvEthernetBuffer;
103103

104104
/* Map the buffer onto a IPv6-Packet struct to easily access the
105105
* fields of the IPv6 packet. */
106-
const IPPacket_IPv6_t * const pxIPv6Packet = ( const IPPacket_IPv6_t * const ) pucEthernetBuffer;
106+
const IPPacket_IPv6_t * const pxIPv6Packet = ( const IPPacket_IPv6_t * ) pucEthernetBuffer;
107107

108108
DEBUG_DECLARE_TRACE_VARIABLE( BaseType_t, xLocation, 0 );
109109

source/FreeRTOS_ND.c

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -97,12 +97,6 @@
9797
/** @brief The ND cache. */
9898
static NDCacheRow_t xNDCache[ ipconfigND_CACHE_ENTRIES ];
9999

100-
/** @brief The time at which the last unsolicited ND was sent. Unsolicited NDs are used
101-
* to ensure ND tables are up to date and to detect IP address conflicts. */
102-
/* MISRA Ref 8.9.1 [File scoped variables] */
103-
/* More details at: https://github.com/FreeRTOS/FreeRTOS-Plus-TCP/blob/main/MISRA.md#rule-89 */
104-
/* coverity[misra_c_2012_rule_8_9_violation] */
105-
static TickType_t xLastUnsolicitedNDTime = 0U;
106100

107101
/*-----------------------------------------------------------*/
108102

@@ -1405,19 +1399,4 @@
14051399
}
14061400

14071401
/*-----------------------------------------------------------*/
1408-
1409-
/**
1410-
* @brief Send an unsolicited ND packet to allow this node to announce the IP-MAC
1411-
* mapping to the entire network.
1412-
*/
1413-
void vNDSendUnsolicited( void )
1414-
{
1415-
/* Setting xLastUnsolicitedNDTime to 0 will force an unsolicited ND the next
1416-
* time vNDAgeCache() is called. */
1417-
xLastUnsolicitedNDTime = ( TickType_t ) 0;
1418-
1419-
/* Let the IP-task call vARPAgeCache(). */
1420-
( void ) xSendEventToIPTask( eNDTimerEvent );
1421-
}
1422-
/*-----------------------------------------------------------*/
14231402
#endif /* ipconfigUSE_IPv6 */

source/FreeRTOS_RA.c

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -329,12 +329,14 @@
329329

330330
case ndICMP_MTU_OPTION: /* 5 */
331331
{
332-
uint32_t ulMTU;
333-
( void ) ulMTU;
334-
335-
/* ulChar2u32 returns host-endian numbers. */
336-
ulMTU = ulChar2u32( &( pucBytes[ uxIndex + 4U ] ) );
337-
FreeRTOS_printf( ( "RA: MTU = %u\n", ( unsigned int ) ulMTU ) );
332+
#if ipconfigHAS_PRINTF == 1
333+
uint32_t ulMTU;
334+
( void ) ulMTU;
335+
336+
/* ulChar2u32 returns host-endian numbers. */
337+
ulMTU = ulChar2u32( &( pucBytes[ uxIndex + 4U ] ) );
338+
FreeRTOS_printf( ( "RA: MTU = %u\n", ( unsigned int ) ulMTU ) );
339+
#endif /* ipconfigHAS_PRINTF == 1 */
338340
}
339341
break;
340342

source/include/FreeRTOS_ND.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -209,8 +209,6 @@
209209
/* Clear all entries in the ND cache. */
210210
void FreeRTOS_ClearND( const struct xNetworkEndPoint * pxEndPoint );
211211

212-
void vNDSendUnsolicited( void );
213-
214212
extern const uint8_t pcLOCAL_ALL_NODES_MULTICAST_IP[ ipSIZE_OF_IPv6_ADDRESS ];
215213
extern const uint8_t pcLOCAL_ALL_NODES_MULTICAST_MAC[ ipMAC_ADDRESS_LENGTH_BYTES ];
216214

test/unit-test/FreeRTOS_ND/FreeRTOS_ND_utest.c

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2139,13 +2139,3 @@ void test_xCheckRequiresNDResolution_AssertInvalidFrameType( void )
21392139

21402140
catch_assert( xCheckRequiresNDResolution( pxNetworkBuffer ) );
21412141
}
2142-
2143-
/**
2144-
* @brief Toggle vNDSendUnsolicited.
2145-
*/
2146-
void test_vNDSendUnsolicited( void )
2147-
{
2148-
xSendEventToIPTask_ExpectAndReturn( eNDTimerEvent, 0 );
2149-
2150-
vNDSendUnsolicited();
2151-
}

0 commit comments

Comments
 (0)