Skip to content

Commit 8a869a7

Browse files
committed
Add exception for Rule 17.11
1 parent 786a3c9 commit 8a869a7

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

MISRA.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -228,3 +228,13 @@ _Ref 21.6.1_
228228
The function `snprintf` is used to insert information in a logging string.
229229
This is only used in a utility function which aids in debugging and is not
230230
part of the 'core' code governing the functionality of the TCP/IP stack.
231+
232+
#### Rule 17.11
233+
234+
_Ref 17.11_
235+
236+
- MISRA C-2012 Rule 17.11 advises that functions that never returns should be
237+
declared with a _Noreturn function specifier. However, in this case, `_Noreturn`
238+
is added by C standard as part of C11 and the FreeRTOS+TCP codebase is compatible
239+
with C90. This is a false positive as the Coverity is also run with C90
240+
as the standard.

source/FreeRTOS_IP.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,8 @@ static BaseType_t xIPTaskInitialised = pdFALSE;
208208

209209
/* MISRA Ref 8.13.1 [Not decorating a pointer to const parameter with const] */
210210
/* More details at: https://github.com/FreeRTOS/FreeRTOS-Plus-TCP/blob/main/MISRA.md#rule-813 */
211+
/* MISRA Ref 17.11 [A function that never returns should be declared with a _Noreturn function specifier] */
212+
/* More details at: https://github.com/FreeRTOS/FreeRTOS-Plus-TCP/blob/main/MISRA.md#rule-1711 */
211213
/* coverity[misra_c_2012_rule_8_13_violation] */
212214
/* coverity[misra_c_2012_rule_17_11_violation] */
213215
static void prvIPTask( void * pvParameters )

0 commit comments

Comments
 (0)