Skip to content

Commit af83f6b

Browse files
committed
Merge branch 'main' into rx_port_dbg_v2
2 parents 8711fbd + 574b646 commit af83f6b

15 files changed

+68
-68
lines changed

CMakeLists.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,15 +196,21 @@ add_compile_options(
196196
$<$<COMPILE_LANG_AND_ID:C,Clang,GNU>:-Wall>
197197
$<$<COMPILE_LANG_AND_ID:C,Clang,GNU>:-Wextra>
198198
$<$<COMPILE_LANG_AND_ID:C,Clang,GNU>:-Werror>
199+
$<$<COMPILE_LANG_AND_ID:C,Clang>:-Wpedantic>
199200
$<$<COMPILE_LANG_AND_ID:C,Clang,GNU>:-Wconversion>
200201
$<$<COMPILE_LANG_AND_ID:C,Clang,GNU>:-Wunused-variable>
201202
$<$<COMPILE_LANG_AND_ID:C,Clang>:-Weverything>
202203

203204
# Suppressions required to build clean with clang.
204205
$<$<COMPILE_LANG_AND_ID:C,Clang>:-Wno-unused-macros>
206+
$<$<COMPILE_LANG_AND_ID:C,Clang>:-Wno-cast-qual>
207+
$<$<COMPILE_LANG_AND_ID:C,Clang>:-Wno-switch-enum>
208+
$<$<COMPILE_LANG_AND_ID:C,Clang>:-Wno-declaration-after-statement>
205209
$<$<COMPILE_LANG_AND_ID:C,Clang>:-Wno-padded>
206210
$<$<COMPILE_LANG_AND_ID:C,Clang>:-Wno-missing-variable-declarations>
207211
$<$<COMPILE_LANG_AND_ID:C,Clang>:-Wno-covered-switch-default>
212+
$<$<COMPILE_LANG_AND_ID:C,Clang>:-Wno-extra-semi-stmt>
213+
$<$<COMPILE_LANG_AND_ID:C,Clang>:-Wno-missing-noreturn>
208214
$<$<COMPILE_LANG_AND_ID:C,Clang>:-Wno-cast-align>
209215
)
210216

source/FreeRTOS_ARP.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -554,7 +554,7 @@ BaseType_t xCheckRequiresARPResolution( const NetworkBufferDescriptor_t * pxNetw
554554
( ucNextHeader == ipPROTOCOL_UDP ) )
555555
{
556556
IPv6_Type_t eType = xIPv6_GetIPType( ( const IPv6_Address_t * ) pxIPAddress );
557-
FreeRTOS_printf( ( "xCheckRequiresARPResolution: %pip type %s\n", pxIPAddress->ucBytes, ( eType == eIPv6_Global ) ? "Global" : ( eType == eIPv6_LinkLocal ) ? "LinkLocal" : "other" ) );
557+
FreeRTOS_printf( ( "xCheckRequiresARPResolution: %pip type %s\n", ( void * ) pxIPAddress->ucBytes, ( eType == eIPv6_Global ) ? "Global" : ( eType == eIPv6_LinkLocal ) ? "LinkLocal" : "other" ) );
558558

559559
if( eType == eIPv6_LinkLocal )
560560
{
@@ -637,8 +637,8 @@ BaseType_t xCheckRequiresARPResolution( const NetworkBufferDescriptor_t * pxNetw
637637
* @brief Look for an IP-MAC couple in ARP cache and reset the 'age' field. If no match
638638
* is found then no action will be taken.
639639
*
640-
* @param[in] pxMACAddress: Pointer to the MAC address whose entry needs to be updated.
641-
* @param[in] ulIPAddress: the IP address whose corresponding entry needs to be updated.
640+
* @param[in] pxMACAddress Pointer to the MAC address whose entry needs to be updated.
641+
* @param[in] ulIPAddress the IP address whose corresponding entry needs to be updated.
642642
*/
643643
void vARPRefreshCacheEntryAge( const MACAddress_t * pxMACAddress,
644644
const uint32_t ulIPAddress )

source/FreeRTOS_BitConfig.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -132,9 +132,9 @@ BaseType_t xBitConfig_read_uc( BitConfig_t * pxConfig,
132132
/**
133133
* @brief Peek the last byte from a bit-config struct.
134134
*
135-
* @param[in] pxConfig: The structure containing a copy of the bits.
136-
* @param[in] pucData: The buffer to stored peeked data.
137-
* @param[in] uxSize: The length of the binary data stream.
135+
* @param[in] pxConfig The structure containing a copy of the bits.
136+
* @param[in] pucData The buffer to stored peeked data.
137+
* @param[in] uxSize The length of the binary data stream.
138138
*
139139
* @return pdTRUE if the malloc was OK, otherwise pdFALSE.
140140
*/

source/FreeRTOS_DHCPv6.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -171,9 +171,9 @@ eDHCPState_t eGetDHCPv6State( struct xNetworkEndPoint * pxEndPoint )
171171
/**
172172
* @brief Check if option length is less than buffer size and larger than minimum requirement.
173173
*
174-
* @param[in] usOption: The option code.
175-
* @param[in] uxOptionLength: The option length to check.
176-
* @param[in] uxRemainingSize: Remaining size in the buffer.
174+
* @param[in] usOption The option code.
175+
* @param[in] uxOptionLength The option length to check.
176+
* @param[in] uxRemainingSize Remaining size in the buffer.
177177
*
178178
* @return pdTRUE if the length is valid, otherwise pdFALSE.
179179
*/
@@ -253,8 +253,8 @@ static BaseType_t prvIsOptionLengthValid( uint16_t usOption,
253253

254254
/**
255255
* @brief A DHCP packet has a list of options, one of them is Status Code. This function is used to parse it.
256-
* @param[in] uxLength: Total length for status code.
257-
* @param[in] pxMessage: The raw packet as it was received.
256+
* @param[in] uxLength Total length for status code.
257+
* @param[in] pxMessage The raw packet as it was received.
258258
*
259259
* @return pdTRUE if status is success, otherwise pdFALSE.
260260
*/
@@ -1158,15 +1158,15 @@ static BaseType_t prvDHCPv6_subOption( uint16_t usOption,
11581158
( void ) xBitConfig_read_uc( pxMessage, pxDHCPMessage->xIPAddress.xIP_IPv6.ucBytes, ipSIZE_OF_IPv6_ADDRESS );
11591159
pxDHCPMessage->ulPreferredLifeTime = ulBitConfig_read_32( pxMessage );
11601160
pxDHCPMessage->ulValidLifeTime = ulBitConfig_read_32( pxMessage );
1161-
FreeRTOS_printf( ( "IP Address %pip\n", pxDHCPMessage->xIPAddress.xIP_IPv6.ucBytes ) );
1161+
FreeRTOS_printf( ( "IP Address %pip\n", ( void * ) pxDHCPMessage->xIPAddress.xIP_IPv6.ucBytes ) );
11621162
break;
11631163

11641164
case DHCPv6_Option_IA_Prefix:
11651165
pxDHCPMessage->ulPreferredLifeTime = ulBitConfig_read_32( pxMessage );
11661166
pxDHCPMessage->ulValidLifeTime = ulBitConfig_read_32( pxMessage );
11671167
pxDHCPMessage->ucprefixLength = ucBitConfig_read_8( pxMessage );
11681168
( void ) xBitConfig_read_uc( pxMessage, pxDHCPMessage->xPrefixAddress.xIP_IPv6.ucBytes, ipSIZE_OF_IPv6_ADDRESS );
1169-
FreeRTOS_printf( ( "Address prefix: %pip length %d\n", pxDHCPMessage->xPrefixAddress.xIP_IPv6.ucBytes, pxDHCPMessage->ucprefixLength ) );
1169+
FreeRTOS_printf( ( "Address prefix: %pip length %d\n", ( void * ) pxDHCPMessage->xPrefixAddress.xIP_IPv6.ucBytes, pxDHCPMessage->ucprefixLength ) );
11701170
break;
11711171

11721172
case DHCPv6_Option_Status_Code:

source/FreeRTOS_DNS.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -657,7 +657,7 @@
657657
if( ( ppxAddressInfo != NULL ) && ( ( *ppxAddressInfo )->ai_family == FREERTOS_AF_INET6 ) )
658658
{
659659
FreeRTOS_printf( ( "prvPrepareLookup: found '%s' in cache: %pip\n",
660-
pcHostName, ( *ppxAddressInfo )->xPrivateStorage.sockaddr.sin_address.xIP_IPv6.ucBytes ) );
660+
pcHostName, ( void * ) ( *ppxAddressInfo )->xPrivateStorage.sockaddr.sin_address.xIP_IPv6.ucBytes ) );
661661
}
662662
else
663663
#endif

source/FreeRTOS_IP.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1789,7 +1789,7 @@ static eFrameProcessingResult_t prvProcessIPPacket( const IPPacket_t * pxIPPacke
17891789
NetworkBufferDescriptor_t * const pxNetworkBuffer )
17901790
{
17911791
eFrameProcessingResult_t eReturn;
1792-
UBaseType_t uxHeaderLength;
1792+
UBaseType_t uxHeaderLength = ipSIZE_OF_IPv4_HEADER;
17931793
uint8_t ucProtocol = 0U;
17941794

17951795
#if ( ipconfigUSE_IPv6 != 0 )

source/FreeRTOS_ND.c

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@
202202

203203
if( eReturn == eARPCacheMiss )
204204
{
205-
FreeRTOS_printf( ( "eNDGetCacheEntry: lookup %pip miss\n", pxIPAddress->ucBytes ) );
205+
FreeRTOS_printf( ( "eNDGetCacheEntry: lookup %pip miss\n", ( void * ) pxIPAddress->ucBytes ) );
206206
}
207207

208208
if( eReturn == eARPCacheMiss )
@@ -219,8 +219,8 @@
219219
}
220220

221221
FreeRTOS_printf( ( "eNDGetCacheEntry: FindEndPointOnIP failed for %pip (endpoint %pip)\n",
222-
pxIPAddress->ucBytes,
223-
pxEndPoint->ipv6_settings.xIPAddress.ucBytes ) );
222+
( void * ) pxIPAddress->ucBytes,
223+
( void * ) pxEndPoint->ipv6_settings.xIPAddress.ucBytes ) );
224224
}
225225
else
226226
{
@@ -239,7 +239,7 @@
239239
}
240240
}
241241

242-
FreeRTOS_printf( ( "eNDGetCacheEntry: LinkLocal %pip \"%s\"\n", pxIPAddress->ucBytes,
242+
FreeRTOS_printf( ( "eNDGetCacheEntry: LinkLocal %pip \"%s\"\n", ( void * ) pxIPAddress->ucBytes,
243243
( eReturn == eARPCacheHit ) ? "hit" : "miss" ) );
244244
}
245245
else
@@ -249,15 +249,15 @@
249249
if( pxEndPoint != NULL )
250250
{
251251
( void ) memcpy( pxIPAddress->ucBytes, pxEndPoint->ipv6_settings.xGatewayAddress.ucBytes, ipSIZE_OF_IPv6_ADDRESS );
252-
FreeRTOS_printf( ( "eNDGetCacheEntry: Using gw %pip\n", pxIPAddress->ucBytes ) );
253-
FreeRTOS_printf( ( "eNDGetCacheEntry: From addr %pip\n", pxEndPoint->ipv6_settings.xIPAddress.ucBytes ) );
252+
FreeRTOS_printf( ( "eNDGetCacheEntry: Using gw %pip\n", ( void * ) pxIPAddress->ucBytes ) );
253+
FreeRTOS_printf( ( "eNDGetCacheEntry: From addr %pip\n", ( void * ) pxEndPoint->ipv6_settings.xIPAddress.ucBytes ) );
254254

255255
/* See if the gateway has an entry in the cache. */
256256
eReturn = prvNDCacheLookup( pxIPAddress, pxMACAddress, ppxEndPoint );
257257

258258
if( *ppxEndPoint != NULL )
259259
{
260-
FreeRTOS_printf( ( "eNDGetCacheEntry: found end-point %pip\n", ( *ppxEndPoint )->ipv6_settings.xIPAddress.ucBytes ) );
260+
FreeRTOS_printf( ( "eNDGetCacheEntry: found end-point %pip\n", ( void * ) ( *ppxEndPoint )->ipv6_settings.xIPAddress.ucBytes ) );
261261
}
262262

263263
*( ppxEndPoint ) = pxEndPoint;
@@ -325,7 +325,7 @@
325325
}
326326
else
327327
{
328-
FreeRTOS_printf( ( "vNDRefreshCacheEntry: %pip not found\n", pxIPAddress->ucBytes ) );
328+
FreeRTOS_printf( ( "vNDRefreshCacheEntry: %pip not found\n", ( void * ) pxIPAddress->ucBytes ) );
329329
}
330330
}
331331
/*-----------------------------------------------------------*/
@@ -442,7 +442,7 @@
442442

443443
FreeRTOS_debug_printf( ( "prvCacheLookup6[ %d ] %pip with %02x:%02x:%02x:%02x:%02x:%02x\n",
444444
( int ) x,
445-
pxAddressToLookup->ucBytes,
445+
( void * ) pxAddressToLookup->ucBytes,
446446
pxMACAddress->ucBytes[ 0 ],
447447
pxMACAddress->ucBytes[ 1 ],
448448
pxMACAddress->ucBytes[ 2 ],
@@ -459,7 +459,7 @@
459459

460460
if( eReturn == eARPCacheMiss )
461461
{
462-
FreeRTOS_printf( ( "prvNDCacheLookup %pip Miss\n", pxAddressToLookup->ucBytes ) );
462+
FreeRTOS_printf( ( "prvNDCacheLookup %pip Miss\n", ( void * ) pxAddressToLookup->ucBytes ) );
463463

464464
if( ppxEndPoint != NULL )
465465
{
@@ -491,7 +491,7 @@
491491
FreeRTOS_printf( ( "ND %2d: age %3u - %pip MAC %02x-%02x-%02x-%02x-%02x-%02x endPoint %s\n",
492492
( int ) x,
493493
xNDCache[ x ].ucAge,
494-
xNDCache[ x ].xIPAddress.ucBytes,
494+
( void * ) xNDCache[ x ].xIPAddress.ucBytes,
495495
xNDCache[ x ].xMACAddress.ucBytes[ 0 ],
496496
xNDCache[ x ].xMACAddress.ucBytes[ 1 ],
497497
xNDCache[ x ].xMACAddress.ucBytes[ 2 ],
@@ -729,7 +729,7 @@
729729
{
730730
/* No endpoint found for the target IP-address. */
731731
FreeRTOS_printf( ( "SendPingRequestIPv6: no end-point found for %pip\n",
732-
pxIPAddress->ucBytes ) );
732+
( void * ) pxIPAddress->ucBytes ) );
733733
}
734734
else if( ( uxGetNumberOfFreeNetworkBuffers() >= 3U ) && ( uxNumberOfBytesToSend >= 1U ) && ( xEnoughSpace != pdFALSE ) )
735735
{
@@ -761,7 +761,7 @@
761761
pxICMPPacket->xIPHeader.usPayloadLength = FreeRTOS_htons( sizeof( ICMPEcho_IPv6_t ) + uxNumberOfBytesToSend );
762762
( void ) memcpy( pxICMPPacket->xIPHeader.xDestinationAddress.ucBytes, pxIPAddress->ucBytes, ipSIZE_OF_IPv6_ADDRESS );
763763
( void ) memcpy( pxICMPPacket->xIPHeader.xSourceAddress.ucBytes, pxEndPoint->ipv6_settings.xIPAddress.ucBytes, ipSIZE_OF_IPv6_ADDRESS );
764-
FreeRTOS_printf( ( "ICMP send from %pip\n", pxICMPPacket->xIPHeader.xSourceAddress.ucBytes ) );
764+
FreeRTOS_printf( ( "ICMP send from %pip\n", ( void * ) pxICMPPacket->xIPHeader.xSourceAddress.ucBytes ) );
765765

766766
/* Fill in the basic header information. */
767767
pxICMPHeader->ucTypeOfMessage = ipICMP_PING_REQUEST_IPv6;
@@ -949,8 +949,8 @@
949949
FreeRTOS_printf( ( "ICMPv6_recv %d (%s) from %pip to %pip end-point = %s\n",
950950
pxICMPHeader_IPv6->ucTypeOfMessage,
951951
pcMessageType( ( BaseType_t ) pxICMPHeader_IPv6->ucTypeOfMessage ),
952-
pxICMPPacket->xIPHeader.xSourceAddress.ucBytes,
953-
pxICMPPacket->xIPHeader.xDestinationAddress.ucBytes,
952+
( void * ) pxICMPPacket->xIPHeader.xSourceAddress.ucBytes,
953+
( void * ) pxICMPPacket->xIPHeader.xDestinationAddress.ucBytes,
954954
pcEndpointName( pxEndPoint, pcAddress, sizeof( pcAddress ) ) ) );
955955
}
956956
}
@@ -1032,7 +1032,7 @@
10321032
char pcName[ 40 ];
10331033
( void ) memset( &( pcName ), 0, sizeof( pcName ) );
10341034
FreeRTOS_printf( ( "Lookup %pip : endpoint %s\n",
1035-
pxICMPHeader_IPv6->xIPv6Address.ucBytes,
1035+
( void * ) pxICMPHeader_IPv6->xIPv6Address.ucBytes,
10361036
pcEndpointName( pxEndPointFound, pcName, sizeof( pcName ) ) ) );
10371037

10381038
if( pxEndPointFound != NULL )
@@ -1055,8 +1055,8 @@
10551055
xCompare = memcmp( pxICMPHeader_IPv6->xIPv6Address.ucBytes, pxEndPoint->ipv6_settings.xIPAddress.ucBytes, ipSIZE_OF_IPv6_ADDRESS );
10561056

10571057
FreeRTOS_printf( ( "ND NS for %pip endpoint %pip %s\n",
1058-
pxICMPHeader_IPv6->xIPv6Address.ucBytes,
1059-
pxEndPoint->ipv6_settings.xIPAddress.ucBytes,
1058+
( void * ) pxICMPHeader_IPv6->xIPv6Address.ucBytes,
1059+
( void * ) pxEndPoint->ipv6_settings.xIPAddress.ucBytes,
10601060
( xCompare == 0 ) ? "Reply" : "Ignore" ) );
10611061

10621062
if( xCompare == 0 )
@@ -1086,7 +1086,7 @@
10861086
&( pxICMPHeader_IPv6->xIPv6Address ),
10871087
pxEndPoint );
10881088
FreeRTOS_printf( ( "NEIGHBOR_ADV from %pip\n",
1089-
pxICMPHeader_IPv6->xIPv6Address.ucBytes ) );
1089+
( void * ) pxICMPHeader_IPv6->xIPv6Address.ucBytes ) );
10901090

10911091
#if ( ipconfigUSE_RA != 0 )
10921092

source/FreeRTOS_RA.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@
152152
}
153153
else
154154
{
155-
FreeRTOS_printf( ( "RA: source %pip\n", xSourceAddress.ucBytes ) );
155+
FreeRTOS_printf( ( "RA: source %pip\n", ( void * ) xSourceAddress.ucBytes ) );
156156
}
157157

158158
if( pxDescriptor->xDataLength < uxNeededSize )
@@ -318,7 +318,7 @@
318318
pxPrefixOption->ucPrefixLength,
319319
FreeRTOS_ntohl( pxPrefixOption->ulValidLifeTime ),
320320
FreeRTOS_ntohl( pxPrefixOption->ulPreferredLifeTime ),
321-
pxPrefixOption->ucPrefix ) );
321+
( void * ) pxPrefixOption->ucPrefix ) );
322322
break;
323323

324324
case ndICMP_REDIRECTED_HEADER: /* 4 */
@@ -489,7 +489,7 @@
489489
pxEndPoint->xRAData.eRAState = eRAStatePreLease;
490490
iptraceRA_SUCCEDEED( &( pxEndPoint->ipv6_settings.xIPAddress ) );
491491
FreeRTOS_printf( ( "RA: succeeded, using IP address %pip Reload after %u seconds\n",
492-
pxEndPoint->ipv6_settings.xIPAddress.ucBytes,
492+
( void * ) pxEndPoint->ipv6_settings.xIPAddress.ucBytes,
493493
( unsigned ) pxEndPoint->xRAData.ulPreferredLifeTime ) );
494494
}
495495
else
@@ -499,7 +499,7 @@
499499

500500
iptraceRA_REQUESTS_FAILED_USING_DEFAULT_IP_ADDRESS( &( pxEndPoint->ipv6_settings.xIPAddress ) );
501501

502-
FreeRTOS_printf( ( "RA: failed, using default parameters and IP address %pip\n", pxEndPoint->ipv6_settings.xIPAddress.ucBytes ) );
502+
FreeRTOS_printf( ( "RA: failed, using default parameters and IP address %pip\n", ( void * ) pxEndPoint->ipv6_settings.xIPAddress.ucBytes ) );
503503
/* Disable the timer. */
504504
uxNewReloadTime = 0U;
505505
}
@@ -577,7 +577,7 @@
577577
FreeRTOS_printf( ( "RA: Creating a random IP-address\n" ) );
578578
}
579579

580-
FreeRTOS_printf( ( "RA: Neighbour solicitation for %pip\n", pxEndPoint->ipv6_settings.xIPAddress.ucBytes ) );
580+
FreeRTOS_printf( ( "RA: Neighbour solicitation for %pip\n", ( void * ) pxEndPoint->ipv6_settings.xIPAddress.ucBytes ) );
581581

582582
uxNeededSize = ipSIZE_OF_ETH_HEADER + ipSIZE_OF_IPv6_HEADER + sizeof( ICMPHeader_IPv6_t );
583583
pxNetworkBuffer = pxGetNetworkBufferWithDescriptor( uxNeededSize, raDONT_BLOCK );
@@ -661,7 +661,7 @@
661661
{
662662
FreeRTOS_printf( ( "vRAProcess( %ld, %pip) bRouterReplied=%d bIPAddressInUse=%d state %d -> %d\n",
663663
xDoReset,
664-
pxEndPoint->ipv6_defaults.xIPAddress.ucBytes,
664+
( void * ) pxEndPoint->ipv6_defaults.xIPAddress.ucBytes,
665665
pxEndPoint->xRAData.bits.bRouterReplied,
666666
pxEndPoint->xRAData.bits.bIPAddressInUse,
667667
eRAState,

0 commit comments

Comments
 (0)