Skip to content

Commit

Permalink
Remove -Wno-pedantic build requirement for FreeRTOS_Sockets.c (#1146)
Browse files Browse the repository at this point in the history
* Remove non pedantic build check requirement for sockets.c

* Fix formatting
  • Loading branch information
tony-josi-aws committed May 10, 2024
1 parent a4295d3 commit bfd8514
Show file tree
Hide file tree
Showing 10 changed files with 50 additions and 7 deletions.
5 changes: 0 additions & 5 deletions source/CMakeLists.txt
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions source/FreeRTOS_Sockets.c
Expand Up @@ -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;

Expand All @@ -3795,6 +3793,8 @@ void vSocketWakeUpUser( FreeRTOS_Socket_t * pxSocket )
}
#endif /* ( ipconfigIPv4_BACKWARD_COMPATIBLE == 1 ) */

( void ) xAddressLength;

xResult = prvTCPConnectStart( pxSocket, pxAddress );

if( xResult == 0 )
Expand Down
6 changes: 6 additions & 0 deletions test/build-combination/AllDisable/FreeRTOSIPConfig.h
Expand Up @@ -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 */
6 changes: 6 additions & 0 deletions test/build-combination/AllEnable/FreeRTOSIPConfig.h
Expand Up @@ -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 */
6 changes: 6 additions & 0 deletions test/build-combination/Enable_IPv4/FreeRTOSIPConfig.h
Expand Up @@ -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 */
6 changes: 6 additions & 0 deletions test/build-combination/Enable_IPv4_IPv6/FreeRTOSIPConfig.h
Expand Up @@ -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 */
6 changes: 6 additions & 0 deletions test/build-combination/Enable_IPv4_TCP/FreeRTOSIPConfig.h
Expand Up @@ -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 */
6 changes: 6 additions & 0 deletions test/build-combination/Enable_IPv6/FreeRTOSIPConfig.h
Expand Up @@ -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 */
6 changes: 6 additions & 0 deletions test/build-combination/Enable_IPv6_TCP/FreeRTOSIPConfig.h
Expand Up @@ -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 */
6 changes: 6 additions & 0 deletions test/build-combination/Header_Self_Contain/FreeRTOSIPConfig.h
Expand Up @@ -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 */

0 comments on commit bfd8514

Please sign in to comment.