mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-09-01 11:53:53 -04:00
Fix small bugs in Kernel (#998)
* Fix small bugs * Cast sizeof to BaseType_t * Test removing assert to fix UT * Revert change to tasks.c Since configIDLE_TASK_NAME must be defined as a string according to the documentation, the macro will always be NULL terminated. Which means that the check `if( cIdleName[ xIdleTaskNameIndex ] == ( char ) 0x00 )` will catch the end of string. * Update coverity config; Add coverity version; Update pvPortMalloc declaration to match the definitions. * Add port files to sed command * Remove warnings about unused parameters in port code --------- Co-authored-by: Rahul Kar <118818625+kar-rahul-aws@users.noreply.github.com>
This commit is contained in:
parent
1a500f1a74
commit
2fcb0f48b1
7 changed files with 68 additions and 69 deletions
|
@ -1,97 +1,91 @@
|
|||
// MISRA C-2012 Rules
|
||||
|
||||
{
|
||||
version : "2.0",
|
||||
standard : "c2012",
|
||||
title: "Coverity MISRA Configuration",
|
||||
deviations : [
|
||||
// Disable the following rules.
|
||||
"version" : "2.0",
|
||||
"standard" : "c2012",
|
||||
"title": "Coverity MISRA Configuration",
|
||||
"deviations" : [
|
||||
{
|
||||
deviation: "Rule 3.1",
|
||||
reason: "We post HTTP links in code comments which contain // inside comments blocks."
|
||||
"deviation": "Rule 3.1",
|
||||
"reason": "We post HTTP links in code comments which contain // inside comments blocks."
|
||||
},
|
||||
{
|
||||
deviation: "Rule 14.4",
|
||||
reason: "do while( 0 ) pattern is used in macros to prevent extra semi-colon."
|
||||
},
|
||||
|
||||
// Disable the following advisory rules and directives.
|
||||
{
|
||||
deviation: "Directive 4.4",
|
||||
reason: "Code snippet is used in comment to help explanation."
|
||||
"deviation": "Rule 14.4",
|
||||
"reason": "do while( 0 ) pattern is used in macros to prevent extra semi-colon."
|
||||
},
|
||||
{
|
||||
deviation: "Directive 4.5",
|
||||
reason: "Allow names that MISRA considers ambiguous."
|
||||
"deviation": "Directive 4.4",
|
||||
"reason": "Code snippet is used in comment to help explanation."
|
||||
},
|
||||
{
|
||||
deviation: "Directive 4.6",
|
||||
reason: "Allow port to use primitive type with typedefs."
|
||||
"deviation": "Directive 4.5",
|
||||
"reason": "Allow names that MISRA considers ambiguous."
|
||||
},
|
||||
{
|
||||
deviation: "Directive 4.8",
|
||||
reason: "HeapRegion_t and HeapStats_t are used only in heap files but declared in portable.h which is included in multiple source files. As a result, these definitions appear in multiple source files where they are not used."
|
||||
"deviation": "Directive 4.6",
|
||||
"reason": "Allow port to use primitive type with typedefs."
|
||||
},
|
||||
{
|
||||
deviation: "Directive 4.9",
|
||||
reason: "FreeRTOS-Kernel is optimised to work on small micro-controllers. To achieve that, function-like macros are used."
|
||||
"deviation": "Directive 4.8",
|
||||
"reason": "HeapRegion_t and HeapStats_t are used only in heap files but declared in portable.h which is included in multiple source files. As a result, these definitions appear in multiple source files where they are not used."
|
||||
},
|
||||
{
|
||||
deviation: "Rule 2.3",
|
||||
reason: "FreeRTOS defines types which is used in application."
|
||||
"deviation": "Directive 4.9",
|
||||
"reason": "FreeRTOS-Kernel is optimised to work on small micro-controllers. To achieve that, function-like macros are used."
|
||||
},
|
||||
{
|
||||
deviation: "Rule 2.4",
|
||||
reason: "Allow to define unused tag."
|
||||
"deviation": "Rule 2.3",
|
||||
"reason": "FreeRTOS defines types which is used in application."
|
||||
},
|
||||
{
|
||||
deviation: "Rule 2.5",
|
||||
reason: "Allow to define unused macro."
|
||||
"deviation": "Rule 2.4",
|
||||
"reason": "Allow to define unused tag."
|
||||
},
|
||||
{
|
||||
deviation: "Rule 5.9",
|
||||
reason: "Allow to define identifier with the same name in structure and global variable."
|
||||
"deviation": "Rule 2.5",
|
||||
"reason": "Allow to define unused macro."
|
||||
},
|
||||
{
|
||||
deviation: "Rule 8.7",
|
||||
reason: "API functions are not used by the library outside of the files they are defined; however, they must be externally visible in order to be used by an application."
|
||||
"deviation": "Rule 5.9",
|
||||
"reason": "Allow to define identifier with the same name in structure and global variable."
|
||||
},
|
||||
{
|
||||
deviation: "Rule 8.9",
|
||||
reason: "Allow to object to be defined in wider scope for debug purpose."
|
||||
"deviation": "Rule 8.7",
|
||||
"reason": "API functions are not used by the library outside of the files they are defined; however, they must be externally visible in order to be used by an application."
|
||||
},
|
||||
{
|
||||
deviation: "Rule 8.13",
|
||||
reason: "Allow to not to use const-qualified type for callback function."
|
||||
"deviation": "Rule 8.9",
|
||||
"reason": "Allow to object to be defined in wider scope for debug purpose."
|
||||
},
|
||||
{
|
||||
deviation: "Rule 11.4",
|
||||
reason: "Allow to convert between a pointer to object and an interger type for stack alignment."
|
||||
"deviation": "Rule 8.13",
|
||||
"reason": "Allow to not to use const-qualified type for callback function."
|
||||
},
|
||||
{
|
||||
deviation: "Rule 15.4",
|
||||
reason: "Allow to use multiple break statements in a loop."
|
||||
"deviation": "Rule 11.4",
|
||||
"reason": "Allow to convert between a pointer to object and an interger type for stack alignment."
|
||||
},
|
||||
{
|
||||
deviation: "Rule 15.5",
|
||||
reason: "Allow to use multiple points of exit."
|
||||
"deviation": "Rule 15.4",
|
||||
"reason": "Allow to use multiple break statements in a loop."
|
||||
},
|
||||
{
|
||||
deviation: "Rule 17.8",
|
||||
reason: "Allow to update the parameters of a function."
|
||||
"deviation": "Rule 15.5",
|
||||
"reason": "Allow to use multiple points of exit."
|
||||
},
|
||||
{
|
||||
deviation: "Rule 18.4",
|
||||
reason: "Allow to use pointer arithmetic."
|
||||
"deviation": "Rule 17.8",
|
||||
"reason": "Allow to update the parameters of a function."
|
||||
},
|
||||
{
|
||||
deviation: "Rule 19.2",
|
||||
reason: "Allow to use union."
|
||||
"deviation": "Rule 18.4",
|
||||
"reason": "Allow to use pointer arithmetic."
|
||||
},
|
||||
{
|
||||
deviation: "Rule 20.5",
|
||||
reason: "Allow to use #undef for MPU wrappers."
|
||||
"deviation": "Rule 19.2",
|
||||
"reason": "Allow to use union."
|
||||
},
|
||||
{
|
||||
"deviation": "Rule 20.5",
|
||||
"reason": "Allow to use #undef for MPU wrappers."
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue