1
0
mirror of https://github.com/FreeRTOS/FreeRTOS-Plus-TCP synced 2025-10-24 03:32:36 +08:00

Misra fix or suppress remaining violations (#529)

* Fix Remaning misra issues

* Suppress rule 8.6

* Fix/Suppress more misra violations

* Style: for formatting

* Style: fix formatting

* Style: fix spelling

* Fix Rule 11.1

* Fix undeteced suppressions

* Enable 32 bits

* Fix more misra leftover violations

* Add justification for a missed violation

* Fix comment for rule 8.13

* Fix comment

* fix misra comments

* Update MISRA.md

Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* Update source/FreeRTOS_Sockets.c

Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* Update source/portable/BufferManagement/BufferAllocation_2.c

Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* Update MISRA.md

Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* Update MISRA.md

Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>

* Suppress Rule 8.9

* Fix build error

* fix build error

* Fix coverity supression bugs

Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>
This commit is contained in:
alfred gedeon
2022-08-08 19:45:09 +02:00
committed by GitHub
parent f8c72717cd
commit 4ac10c84a3
10 changed files with 169 additions and 66 deletions

View File

@@ -168,7 +168,7 @@
* stack. FreeRTOS includes optional stack overflow detection, see:
* http://www.freertos.org/Stacks-and-stack-overflow-checking.html */
#ifndef ipconfigIP_TASK_STACK_SIZE_WORDS
#define ipconfigIP_TASK_STACK_SIZE_WORDS ( configMINIMAL_STACK_SIZE * 5 )
#define ipconfigIP_TASK_STACK_SIZE_WORDS ( configMINIMAL_STACK_SIZE * 5U )
#endif
/* Include all API's and code that is needed for the TCP protocol.
@@ -259,6 +259,9 @@
#ifndef FreeRTOS_debug_printf
#define FreeRTOS_debug_printf( MSG ) do {} while( ipFALSE_BOOL )
/* MISRA Ref 20.5.1 [Use of undef] */
/* More details at: https://github.com/FreeRTOS/FreeRTOS-Plus-TCP/blob/main/MISRA.md#rule-2051 */
/* coverity[misra_c_2012_rule_20_5_violation] */
#undef ipconfigHAS_DEBUG_PRINTF
#define ipconfigHAS_DEBUG_PRINTF 0
#endif
@@ -282,6 +285,9 @@
#ifndef FreeRTOS_printf
#define FreeRTOS_printf( MSG ) do {} while( ipFALSE_BOOL )
/* MISRA Ref 20.5.1 [Use of undef] */
/* More details at: https://github.com/FreeRTOS/FreeRTOS-Plus-TCP/blob/main/MISRA.md#rule-2051 */
/* coverity[misra_c_2012_rule_20_5_violation] */
#undef ipconfigHAS_PRINTF
#define ipconfigHAS_PRINTF 0
#endif
@@ -611,6 +617,9 @@
#else
/* A sanity check to avoid a possible overflow of size_t. */
#if ipconfigNETWORK_MTU > ( SIZE_MAX >> 1 )
/* MISRA Ref 20.5.1 [Use of undef] */
/* More details at: https://github.com/FreeRTOS/FreeRTOS-Plus-TCP/blob/main/MISRA.md#rule-2051 */
/* coverity[misra_c_2012_rule_20_5_violation] */
#undef ipconfigNETWORK_MTU
#define ipconfigNETWORK_MTU ( SIZE_MAX >> 1 )
#endif