From bfd85142c432ff7668397d1247f9fbb6bed719aa Mon Sep 17 00:00:00 2001 From: Tony Josi Date: Fri, 10 May 2024 12:21:27 +0530 Subject: [PATCH] Remove -Wno-pedantic build requirement for FreeRTOS_Sockets.c (#1146) * Remove non pedantic build check requirement for sockets.c * Fix formatting --- source/CMakeLists.txt | 5 ----- source/FreeRTOS_Sockets.c | 4 ++-- test/build-combination/AllDisable/FreeRTOSIPConfig.h | 6 ++++++ test/build-combination/AllEnable/FreeRTOSIPConfig.h | 6 ++++++ test/build-combination/Enable_IPv4/FreeRTOSIPConfig.h | 6 ++++++ test/build-combination/Enable_IPv4_IPv6/FreeRTOSIPConfig.h | 6 ++++++ test/build-combination/Enable_IPv4_TCP/FreeRTOSIPConfig.h | 6 ++++++ test/build-combination/Enable_IPv6/FreeRTOSIPConfig.h | 6 ++++++ test/build-combination/Enable_IPv6_TCP/FreeRTOSIPConfig.h | 6 ++++++ .../Header_Self_Contain/FreeRTOSIPConfig.h | 6 ++++++ 10 files changed, 50 insertions(+), 7 deletions(-) diff --git a/source/CMakeLists.txt b/source/CMakeLists.txt index e89f0c922..6a6c429b2 100644 --- a/source/CMakeLists.txt +++ b/source/CMakeLists.txt @@ -92,11 +92,6 @@ target_include_directories( freertos_plus_tcp include ) -# Suppressions required to build clean with GCC -if(CMAKE_C_COMPILER_ID STREQUAL GNU) - set_source_files_properties(FreeRTOS_Sockets.c PROPERTIES COMPILE_FLAGS -Wno-pedantic) -endif() - target_link_libraries( freertos_plus_tcp PUBLIC freertos_config diff --git a/source/FreeRTOS_Sockets.c b/source/FreeRTOS_Sockets.c index f1c4ac831..6568e8fc0 100644 --- a/source/FreeRTOS_Sockets.c +++ b/source/FreeRTOS_Sockets.c @@ -3779,8 +3779,6 @@ void vSocketWakeUpUser( FreeRTOS_Socket_t * pxSocket ) BaseType_t xResult = -pdFREERTOS_ERRNO_EINVAL; TimeOut_t xTimeOut; - ( void ) xAddressLength; - #if ( ipconfigIPv4_BACKWARD_COMPATIBLE == 1 ) struct freertos_sockaddr xTempAddress; @@ -3795,6 +3793,8 @@ void vSocketWakeUpUser( FreeRTOS_Socket_t * pxSocket ) } #endif /* ( ipconfigIPv4_BACKWARD_COMPATIBLE == 1 ) */ + ( void ) xAddressLength; + xResult = prvTCPConnectStart( pxSocket, pxAddress ); if( xResult == 0 ) diff --git a/test/build-combination/AllDisable/FreeRTOSIPConfig.h b/test/build-combination/AllDisable/FreeRTOSIPConfig.h index 4fa5a6225..b84c2670c 100644 --- a/test/build-combination/AllDisable/FreeRTOSIPConfig.h +++ b/test/build-combination/AllDisable/FreeRTOSIPConfig.h @@ -294,4 +294,10 @@ #define portINLINE __inline +#define ipconfigISO_STRICTNESS_VIOLATION_START \ + _Pragma("GCC diagnostic push") \ + _Pragma("GCC diagnostic ignored \"-Wpedantic\"") + +#define ipconfigISO_STRICTNESS_VIOLATION_END _Pragma("GCC diagnostic pop") + #endif /* FREERTOS_IP_CONFIG_H */ diff --git a/test/build-combination/AllEnable/FreeRTOSIPConfig.h b/test/build-combination/AllEnable/FreeRTOSIPConfig.h index 769bd39fd..bdafa0627 100644 --- a/test/build-combination/AllEnable/FreeRTOSIPConfig.h +++ b/test/build-combination/AllEnable/FreeRTOSIPConfig.h @@ -322,4 +322,10 @@ #define portINLINE __inline +#define ipconfigISO_STRICTNESS_VIOLATION_START \ + _Pragma("GCC diagnostic push") \ + _Pragma("GCC diagnostic ignored \"-Wpedantic\"") + +#define ipconfigISO_STRICTNESS_VIOLATION_END _Pragma("GCC diagnostic pop") + #endif /* FREERTOS_IP_CONFIG_H */ diff --git a/test/build-combination/Enable_IPv4/FreeRTOSIPConfig.h b/test/build-combination/Enable_IPv4/FreeRTOSIPConfig.h index 41ca29e67..1af6f8bf9 100644 --- a/test/build-combination/Enable_IPv4/FreeRTOSIPConfig.h +++ b/test/build-combination/Enable_IPv4/FreeRTOSIPConfig.h @@ -325,4 +325,10 @@ #define portINLINE __inline +#define ipconfigISO_STRICTNESS_VIOLATION_START \ + _Pragma("GCC diagnostic push") \ + _Pragma("GCC diagnostic ignored \"-Wpedantic\"") + +#define ipconfigISO_STRICTNESS_VIOLATION_END _Pragma("GCC diagnostic pop") + #endif /* FREERTOS_IP_CONFIG_H */ diff --git a/test/build-combination/Enable_IPv4_IPv6/FreeRTOSIPConfig.h b/test/build-combination/Enable_IPv4_IPv6/FreeRTOSIPConfig.h index 33c322b3f..758c68f90 100644 --- a/test/build-combination/Enable_IPv4_IPv6/FreeRTOSIPConfig.h +++ b/test/build-combination/Enable_IPv4_IPv6/FreeRTOSIPConfig.h @@ -325,4 +325,10 @@ #define portINLINE __inline +#define ipconfigISO_STRICTNESS_VIOLATION_START \ + _Pragma("GCC diagnostic push") \ + _Pragma("GCC diagnostic ignored \"-Wpedantic\"") + +#define ipconfigISO_STRICTNESS_VIOLATION_END _Pragma("GCC diagnostic pop") + #endif /* FREERTOS_IP_CONFIG_H */ diff --git a/test/build-combination/Enable_IPv4_TCP/FreeRTOSIPConfig.h b/test/build-combination/Enable_IPv4_TCP/FreeRTOSIPConfig.h index ca3b03a46..9689f54a6 100644 --- a/test/build-combination/Enable_IPv4_TCP/FreeRTOSIPConfig.h +++ b/test/build-combination/Enable_IPv4_TCP/FreeRTOSIPConfig.h @@ -325,4 +325,10 @@ #define portINLINE __inline +#define ipconfigISO_STRICTNESS_VIOLATION_START \ + _Pragma("GCC diagnostic push") \ + _Pragma("GCC diagnostic ignored \"-Wpedantic\"") + +#define ipconfigISO_STRICTNESS_VIOLATION_END _Pragma("GCC diagnostic pop") + #endif /* FREERTOS_IP_CONFIG_H */ diff --git a/test/build-combination/Enable_IPv6/FreeRTOSIPConfig.h b/test/build-combination/Enable_IPv6/FreeRTOSIPConfig.h index 5838f89d7..5be4d7c3f 100644 --- a/test/build-combination/Enable_IPv6/FreeRTOSIPConfig.h +++ b/test/build-combination/Enable_IPv6/FreeRTOSIPConfig.h @@ -325,4 +325,10 @@ #define portINLINE __inline +#define ipconfigISO_STRICTNESS_VIOLATION_START \ + _Pragma("GCC diagnostic push") \ + _Pragma("GCC diagnostic ignored \"-Wpedantic\"") + +#define ipconfigISO_STRICTNESS_VIOLATION_END _Pragma("GCC diagnostic pop") + #endif /* FREERTOS_IP_CONFIG_H */ diff --git a/test/build-combination/Enable_IPv6_TCP/FreeRTOSIPConfig.h b/test/build-combination/Enable_IPv6_TCP/FreeRTOSIPConfig.h index a3fc56f2a..2a4b581d9 100644 --- a/test/build-combination/Enable_IPv6_TCP/FreeRTOSIPConfig.h +++ b/test/build-combination/Enable_IPv6_TCP/FreeRTOSIPConfig.h @@ -325,4 +325,10 @@ #define portINLINE __inline +#define ipconfigISO_STRICTNESS_VIOLATION_START \ + _Pragma("GCC diagnostic push") \ + _Pragma("GCC diagnostic ignored \"-Wpedantic\"") + +#define ipconfigISO_STRICTNESS_VIOLATION_END _Pragma("GCC diagnostic pop") + #endif /* FREERTOS_IP_CONFIG_H */ diff --git a/test/build-combination/Header_Self_Contain/FreeRTOSIPConfig.h b/test/build-combination/Header_Self_Contain/FreeRTOSIPConfig.h index c27b20c3c..051665346 100644 --- a/test/build-combination/Header_Self_Contain/FreeRTOSIPConfig.h +++ b/test/build-combination/Header_Self_Contain/FreeRTOSIPConfig.h @@ -321,4 +321,10 @@ #define portINLINE __inline +#define ipconfigISO_STRICTNESS_VIOLATION_START \ + _Pragma("GCC diagnostic push") \ + _Pragma("GCC diagnostic ignored \"-Wpedantic\"") + +#define ipconfigISO_STRICTNESS_VIOLATION_END _Pragma("GCC diagnostic pop") + #endif /* FREERTOS_IP_CONFIG_H */