From a20213d3142f7b10764e68bb77e9c4ab6d0ee11b Mon Sep 17 00:00:00 2001 From: Tony Josi Date: Tue, 8 Aug 2023 11:37:02 +0530 Subject: [PATCH 1/3] remove forward declarations --- source/include/FreeRTOS_IP_Private.h | 3 --- source/include/FreeRTOS_IP_Utils.h | 3 --- source/include/FreeRTOS_IPv4.h | 5 ----- 3 files changed, 11 deletions(-) diff --git a/source/include/FreeRTOS_IP_Private.h b/source/include/FreeRTOS_IP_Private.h index 029d50880f..b77f2317a6 100644 --- a/source/include/FreeRTOS_IP_Private.h +++ b/source/include/FreeRTOS_IP_Private.h @@ -57,9 +57,6 @@ #define ipFOREVER() 1 #endif -/* Forward declaration of 'NetworkEndPoint_t'. */ -typedef struct xNetworkEndPoint NetworkEndPoint_t; - typedef enum eFrameProcessingResult { eReleaseBuffer = 0, /* Processing the frame did not find anything to do - just release the buffer. */ diff --git a/source/include/FreeRTOS_IP_Utils.h b/source/include/FreeRTOS_IP_Utils.h index 226e6811a3..89b6e58aa7 100644 --- a/source/include/FreeRTOS_IP_Utils.h +++ b/source/include/FreeRTOS_IP_Utils.h @@ -65,9 +65,6 @@ #endif /* *INDENT-ON* */ -/* Forward declaration of 'NetworkInterface_t'. */ -typedef struct xNetworkInterface NetworkInterface_t; - #if ( ipconfigUSE_DHCP != 0 ) /** diff --git a/source/include/FreeRTOS_IPv4.h b/source/include/FreeRTOS_IPv4.h index 457b013035..264cc313fa 100644 --- a/source/include/FreeRTOS_IPv4.h +++ b/source/include/FreeRTOS_IPv4.h @@ -42,11 +42,6 @@ #endif /* *INDENT-ON* */ -/* Forward declarations. */ -typedef struct xNETWORK_BUFFER NetworkBufferDescriptor_t; -typedef enum eFrameProcessingResult eFrameProcessingResult_t; -typedef struct xIP_PACKET IPPacket_t; - #define ipSIZE_OF_IPv4_HEADER 20U #define ipSIZE_OF_IPv4_ADDRESS 4U #define ipSIZE_OF_ICMPv4_HEADER 8U From 063cb729f5596386039e33e00c284180ac346992 Mon Sep 17 00:00:00 2001 From: Tony Josi Date: Tue, 8 Aug 2023 15:43:11 +0530 Subject: [PATCH 2/3] Revert "remove forward declarations" This reverts commit a20213d3142f7b10764e68bb77e9c4ab6d0ee11b. --- source/include/FreeRTOS_IP_Private.h | 3 +++ source/include/FreeRTOS_IP_Utils.h | 3 +++ source/include/FreeRTOS_IPv4.h | 5 +++++ 3 files changed, 11 insertions(+) diff --git a/source/include/FreeRTOS_IP_Private.h b/source/include/FreeRTOS_IP_Private.h index b77f2317a6..029d50880f 100644 --- a/source/include/FreeRTOS_IP_Private.h +++ b/source/include/FreeRTOS_IP_Private.h @@ -57,6 +57,9 @@ #define ipFOREVER() 1 #endif +/* Forward declaration of 'NetworkEndPoint_t'. */ +typedef struct xNetworkEndPoint NetworkEndPoint_t; + typedef enum eFrameProcessingResult { eReleaseBuffer = 0, /* Processing the frame did not find anything to do - just release the buffer. */ diff --git a/source/include/FreeRTOS_IP_Utils.h b/source/include/FreeRTOS_IP_Utils.h index 89b6e58aa7..226e6811a3 100644 --- a/source/include/FreeRTOS_IP_Utils.h +++ b/source/include/FreeRTOS_IP_Utils.h @@ -65,6 +65,9 @@ #endif /* *INDENT-ON* */ +/* Forward declaration of 'NetworkInterface_t'. */ +typedef struct xNetworkInterface NetworkInterface_t; + #if ( ipconfigUSE_DHCP != 0 ) /** diff --git a/source/include/FreeRTOS_IPv4.h b/source/include/FreeRTOS_IPv4.h index 264cc313fa..457b013035 100644 --- a/source/include/FreeRTOS_IPv4.h +++ b/source/include/FreeRTOS_IPv4.h @@ -42,6 +42,11 @@ #endif /* *INDENT-ON* */ +/* Forward declarations. */ +typedef struct xNETWORK_BUFFER NetworkBufferDescriptor_t; +typedef enum eFrameProcessingResult eFrameProcessingResult_t; +typedef struct xIP_PACKET IPPacket_t; + #define ipSIZE_OF_IPv4_HEADER 20U #define ipSIZE_OF_IPv4_ADDRESS 4U #define ipSIZE_OF_ICMPv4_HEADER 8U From 6dee8ad5480bde9a7c537eb010c9c70b0c4d1c45 Mon Sep 17 00:00:00 2001 From: Tony Josi Date: Tue, 8 Aug 2023 15:49:00 +0530 Subject: [PATCH 3/3] supress IAR warnings --- source/portable/Compiler/IAR/pack_struct_start.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/source/portable/Compiler/IAR/pack_struct_start.h b/source/portable/Compiler/IAR/pack_struct_start.h index a2dff65996..9cd5a3274d 100644 --- a/source/portable/Compiler/IAR/pack_struct_start.h +++ b/source/portable/Compiler/IAR/pack_struct_start.h @@ -36,4 +36,7 @@ * end of file not followed by a semicolon or a declarator] emitted by the IAR Compiler */ #pragma diag_suppress=Pe1644 +/* Following line is to suppress the warning about the usage of forward declarations. */ +#pragma diag_suppress=Pe301 + __packed