@@ -1004,26 +1004,29 @@ void vPreCheckConfigs( void )
10041004 {
10051005 size_t uxSize ;
10061006
1007- /* Check if ipBUFFER_PADDING has a minimum size, depending on the platform.
1008- * See FreeRTOS_IP.h for more details. */
1009- #if ( UINTPTR_MAX > 0xFFFFFFFFU )
1007+ #if ( ipconfigSUPPRESS_BUFFER_PADDING_CHECK == 0 )
1008+
1009+ /* Check if ipBUFFER_PADDING has a minimum size, depending on the platform.
1010+ * See FreeRTOS_IP.h for more details. */
1011+ #if ( UINTPTR_MAX > 0xFFFFFFFFU )
1012+
1013+ /*
1014+ * This is a 64-bit platform, make sure there is enough space in
1015+ * pucEthernetBuffer to store a pointer.
1016+ */
1017+ configASSERT ( ipBUFFER_PADDING >= 14U );
1018+ #else
1019+ /* This is a 32-bit platform. */
1020+ configASSERT ( ipBUFFER_PADDING >= 10U );
1021+ #endif /* UINTPTR_MAX > 0xFFFFFFFFU */
10101022
10111023 /*
1012- * This is a 64-bit platform, make sure there is enough space in
1013- * pucEthernetBuffer to store a pointer.
1024+ * The size of the Ethernet header (14) plus ipBUFFER_PADDING should be a
1025+ * multiple of 32 bits, in order to get aligned access to all uint32_t
1026+ * fields in the protocol headers.
10141027 */
1015- configASSERT ( ipBUFFER_PADDING >= 14U );
1016- #else
1017- /* This is a 32-bit platform. */
1018- configASSERT ( ipBUFFER_PADDING >= 10U );
1019- #endif /* UINTPTR_MAX > 0xFFFFFFFFU */
1020-
1021- /*
1022- * The size of the Ethernet header (14) plus ipBUFFER_PADDING should be a
1023- * multiple of 32 bits, in order to get aligned access to all uint32_t
1024- * fields in the protocol headers.
1025- */
1026- configASSERT ( ( ( ( ipSIZE_OF_ETH_HEADER ) + ( ipBUFFER_PADDING ) ) % 4U ) == 0U );
1028+ configASSERT ( ( ( ( ipSIZE_OF_ETH_HEADER ) + ( ipBUFFER_PADDING ) ) % 4U ) == 0U );
1029+ #endif /* if ( ipconfigSUPPRESS_BUFFER_PADDING_CHECK == 0 ) */
10271030
10281031 /* LCOV_EXCL_BR_START */
10291032 uxSize = ipconfigNETWORK_MTU ;
@@ -1835,6 +1838,9 @@ void vReleaseSinglePacketFromUDPSocket( const ConstSocket_t xSocket )
18351838 int32_t lBytes ;
18361839
18371840 /* Passing the address of a pointer (pucUDPPayload) because FREERTOS_ZERO_COPY is used. */
1841+ /* MISRA Ref 4.7.1 [Return value shall be checked] */
1842+ /* More details at: https://github.com/FreeRTOS/FreeRTOS-Plus-TCP/blob/main/MISRA.md#directive-47. */
1843+ /* coverity[misra_c_2012_directive_4_7_violation] */
18381844 lBytes = FreeRTOS_recvfrom ( xSocket , & pucUDPPayload , 0U , FREERTOS_ZERO_COPY , NULL , NULL );
18391845
18401846 ( void ) lBytes ;
0 commit comments