Skip to content

Commit fe372f1

Browse files
committed
Taking global exception for Rule 17.11
1 parent ec8aef6 commit fe372f1

File tree

3 files changed

+4
-13
lines changed

3 files changed

+4
-13
lines changed

MISRA.md

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -228,13 +228,3 @@ _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: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -208,10 +208,7 @@ 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 */
213211
/* coverity[misra_c_2012_rule_8_13_violation] */
214-
/* coverity[misra_c_2012_rule_17_11_violation] */
215212
static void prvIPTask( void * pvParameters )
216213
{
217214
/* Just to prevent compiler warnings about unused parameters. */

test/Coverity/coverity_misra.config

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,10 @@
4242
deviation: "Rule 2.4",
4343
reason: "Similar to the FreeRTOS Kernel, structures are always declared with both a struct tag and typedef alias. Some of these structs are always referred to by their typedef alias and thus the corresponding tags are unused."
4444
},
45+
{
46+
deviation: "Rule 17.11",
47+
reason: "_Noreturn is added by C standard as part of C11 and the FreeRTOS+TCP codebase is compatible with C90. This is a false positive as the Coverity is also run with C90 as the standard. "
48+
},
4549
{
4650
deviation: "Directive 4.8",
4751
reason: "We include lots of header files from other sources such as the kernel which defines structures that violate that Dir"

0 commit comments

Comments
 (0)