Skip to content

Commit

Permalink
FreeRTOS_Sockets: fix compilation on GCC with enabled -Wpedantic
Browse files Browse the repository at this point in the history
  • Loading branch information
Mixaill committed Dec 23, 2023
1 parent 3411099 commit 3922ce3
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions source/FreeRTOS_Sockets.c
Original file line number Diff line number Diff line change
Expand Up @@ -2898,9 +2898,16 @@ BaseType_t FreeRTOS_setsockopt( Socket_t xSocket,
/* MISRA Ref 11.1.1 [ Conversion between pointer to
* a function and another type ] */
/* More details at: https://github.com/FreeRTOS/FreeRTOS-Plus-TCP/blob/main/MISRA.md#rule-111 */
#ifdef __GNUC__
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wpedantic"
#endif
/* coverity[misra_c_2012_rule_11_8_violation] */
/* coverity[misra_c_2012_rule_11_1_violation] */
pxSocket->pxUserWakeCallback = ( SocketWakeupCallback_t ) pvOptionValue;
#ifdef __GNUC__
#pragma GCC diagnostic pop
#endif
xReturn = 0;
break;
#endif /* ipconfigSOCKET_HAS_USER_WAKE_CALLBACK */
Expand Down

0 comments on commit 3922ce3

Please sign in to comment.