mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 10:11:27 +01:00
Rule 20.4 states: "A macro shall not be defined with the same name as a keyword". Defining this macro with the same name as the inline keyword allows for additionally checking that out-of-lined static inline functions end up in the correct section while minimizing churn and has a positive impact on the overall safety. See [1] for additional context on the motivation of this deviation. No functional change. [1] https://lore.kernel.org/xen-devel/adaa6d55-266d-4df8-8967-9340080d17e4@citrix.com/ Signed-off-by: Nicola Vetrini <nicola.vetrini@bugseng.com>
45 lines
1.8 KiB
JSON
45 lines
1.8 KiB
JSON
{
|
|
"version": "1.0",
|
|
"content": [
|
|
{
|
|
"id": "SAF-0-safe",
|
|
"analyser": {
|
|
"eclair": "MC3R1.R8.6",
|
|
"coverity": "misra_c_2012_rule_8_6_violation"
|
|
},
|
|
"name": "Rule 8.6: linker script defined symbols",
|
|
"text": "It is safe to declare this symbol because it is defined in the linker script."
|
|
},
|
|
{
|
|
"id": "SAF-1-safe",
|
|
"analyser": {
|
|
"eclair": "MC3R1.R8.4"
|
|
},
|
|
"name": "Rule 8.4: asm-only definition",
|
|
"text": "Functions and variables used only by asm modules do not need to have a visible declaration prior to their definition."
|
|
},
|
|
{
|
|
"id": "SAF-2-safe",
|
|
"analyser": {
|
|
"eclair": "MC3R1.R10.1"
|
|
},
|
|
"name": "MC3R1.R10.1: use of an enumeration constant in an arithmetic operation",
|
|
"text": "This violation can be fixed with a cast to (int) of the enumeration constant, but a deviation was chosen due to code readability (see also the comment in BITS_TO_LONGS)."
|
|
},
|
|
{
|
|
"id": "SAF-3-safe",
|
|
"analyser": {
|
|
"eclair": "MC3R1.R20.4"
|
|
},
|
|
"name": "MC3R1.R20.4: allow the definition of a macro with the same name as a keyword in some special cases",
|
|
"text": "The definition of a macro with the same name as a keyword can be useful in certain configurations to improve the guarantees that can be provided by Xen. See docs/misra/deviations.rst for a precise rationale for all such cases."
|
|
},
|
|
{
|
|
"id": "SAF-4-safe",
|
|
"analyser": {},
|
|
"name": "Sentinel",
|
|
"text": "Next ID to be used"
|
|
}
|
|
]
|
|
}
|