1
0
mirror of https://github.com/FreeRTOS/FreeRTOS-Plus-TCP synced 2025-10-21 23:30:39 +08:00

Fix Additional Clang warnings

Corrects several warnings from Clang flags
for Clang 13.
This commit is contained in:
Monika Singh
2023-04-17 18:39:49 +00:00
parent f15537303c
commit a492abb0a8
25 changed files with 318 additions and 315 deletions

View File

@@ -80,8 +80,8 @@ const struct xIPv6_Address FreeRTOS_in6addr_loopback = { { 0, 0, 0, 0, 0, 0, 0,
/**
* @brief Check IPv6 packet length.
*
* @param[in] pvEthernetBuffer: The Ethernet packet received.
* @param[in] uxBufferLength: The total number of bytes received.
* @param[in] pvEthernetBuffer The Ethernet packet received.
* @param[in] uxBufferLength The total number of bytes received.
*
* @return pdPASS when the length fields in the packet OK, pdFAIL when the packet
* should be dropped.
@@ -210,7 +210,7 @@ const struct xIPv6_Address FreeRTOS_in6addr_loopback = { { 0, 0, 0, 0, 0, 0, 0,
/**
* @brief Check if ucNextHeader is an extension header.
*
* @param[in] ucNextHeader: Next header, such as ipIPv6_EXT_HEADER_HOP_BY_HOP.
* @param[in] ucNextHeader Next header, such as ipIPv6_EXT_HEADER_HOP_BY_HOP.
*
* @return pdTRUE if it's extension header, otherwise pdFALSE.
*/
@@ -253,7 +253,7 @@ static const struct xIPv6_Address xIPv6UnspecifiedAddress = { { 0, 0, 0, 0, 0, 0
/**
* @brief Get the group ID and stored into IPv6_Address_t.
*
* @param[in] pxIPv6Address: The multicast address to filter group ID.
* @param[in] pxIPv6Address The multicast address to filter group ID.
*
* @return IPv6_Address_t with group ID only.
*/
@@ -276,7 +276,7 @@ static IPv6_Address_t xGetIPv6MulticastGroupID( const IPv6_Address_t * pxIPv6Add
/**
* @brief Check if the packet is a loopback packet.
*
* @param[in] pxIPv6Header: The IP packet in pxNetworkBuffer.
* @param[in] pxIPv6Header The IP packet in pxNetworkBuffer.
*
* @return Returns pdTRUE if it's a legal loopback packet, pdFALSE if not .
*/
@@ -306,7 +306,7 @@ static IPv6_Address_t xGetIPv6MulticastGroupID( const IPv6_Address_t * pxIPv6Add
/**
* @brief Check whether this IPv6 address is an allowed multicast address or not.
*
* @param[in] pxIPAddress: The IP address to be checked.
* @param[in] pxIPAddress The IP address to be checked.
*
* @return Returns pdTRUE if pxIPAddress is an allowed multicast address, pdFALSE if not.
*/
@@ -354,9 +354,9 @@ BaseType_t xIsIPv6AllowedMulticast( const IPv6_Address_t * pxIPAddress )
* the special unicast address: ff02::1:ffnn:nnnn, where nn:nnnn are
* the last 3 bytes of the IPv6 address.
*
* @param[in] pxLeft: First IP address.
* @param[in] pxRight: Second IP address.
* @param[in] uxPrefixLength: The IP address prefix length in bits.
* @param[in] pxLeft First IP address.
* @param[in] pxRight Second IP address.
* @param[in] uxPrefixLength The IP address prefix length in bits.
*
* @return Returns 0 if it can handle it, else non zero .
*/
@@ -438,9 +438,9 @@ BaseType_t xCompareIPv6_Address( const IPv6_Address_t * pxLeft,
/**
* @brief Check whether this IPv6 packet is to be allowed or to be dropped.
*
* @param[in] pxIPv6Header: The IP packet under consideration.
* @param[in] pxNetworkBuffer: The whole network buffer.
* @param[in] uxHeaderLength: The length of the header.
* @param[in] pxIPv6Header The IP packet under consideration.
* @param[in] pxNetworkBuffer The whole network buffer.
* @param[in] uxHeaderLength The length of the header.
*
* @return Whether the packet should be processed or dropped.
*/
@@ -550,8 +550,8 @@ eFrameProcessingResult_t prvAllowIPPacketIPv6( const IPHeader_IPv6_t * const pxI
/**
* @brief Check extension header and next header and return their order.
*
* @param[in] ucProtocol: Extension header ID.
* @param[in] ucNextHeader: Next header ID.
* @param[in] ucProtocol Extension header ID.
* @param[in] ucNextHeader Next header ID.
*
* @return Extension header order in the packet.
*/
@@ -613,8 +613,8 @@ BaseType_t xGetExtensionOrder( uint8_t ucProtocol,
/**
* @brief Handle the IPv6 extension headers.
*
* @param[in,out] pxNetworkBuffer: The received packet that contains IPv6 extension headers.
* @param[in] xDoRemove: Function removes the extension header if xDoRemove is set to pdTRUE.
* @param[in,out] pxNetworkBuffer The received packet that contains IPv6 extension headers.
* @param[in] xDoRemove Function removes the extension header if xDoRemove is set to pdTRUE.
*
* @return eProcessBuffer in case the options are removed successfully, otherwise
* eReleaseBuffer.
@@ -638,6 +638,8 @@ eFrameProcessingResult_t eHandleIPv6ExtensionHeaders( NetworkBufferDescriptor_t
BaseType_t xNextOrder = 0;
BaseType_t xExtHeaderCount = 0;
( void ) xNextOrder;
while( ( uxIndex + 8U ) < uxMaxLength )
{
BaseType_t xCurrentOrder;