sarmfsw: SMFSW Toolbox (desinged for ARM / compatible with other 8b/16b/32b platforms) 4.0rc
SMFSW collection of miscellaneous functions \& macros (desinged for ARM / compatible with other 8b/16b/32b platforms)
Loading...
Searching...
No Matches
MISRA C:2012 Deviations List
File arm_attributes.h

Header scope deviation has been granted for following rules:
Rule-20.5 - Advisory: #undef (misra-c2012-20.5)
Rule-20.10 - Advisory: # and ## preprocessor operators (misra-c2012-20.10)

Header scope legitimate use derogation authorized for:
Rule-21.1 - Required: #define and #undef on reserved identifiers (misra-c2012-21.1)
Justification: #define are generic reserved identifiers for attributes.

File arm_chip_ino.h
Header scope legitimate use derogation authorized for:
Rule-5.6 - Required: unique typedef name (misra-c2012-5.6)
Rule-5.9 - Advisory: internal linkage unique function name (misra-c2012-5.9)
Justification: typedefs name are only defined once (other arm_chip_xxx files are not included at the same time).
File arm_chip_pic.h

Header scope legitimate use derogation authorized for:
Rule-5.6 - Required: unique typedef name (misra-c2012-5.6)
Rule-5.9 - Advisory: internal linkage unique function name (misra-c2012-5.9)
Justification: typedefs name are only defined once (other arm_chip_xxx files are not included at the same time).

Header scope deviation has been granted for following rules:
Rule-20.5 - Advisory: #undef (misra-c2012-20.5)

File arm_chip_sam.h
Header scope legitimate use derogation authorized for:
Rule-5.6 - Required: unique typedef name (misra-c2012-5.6)
Rule-5.9 - Advisory: internal linkage unique function name (misra-c2012-5.9)
Justification: typedefs name are only defined once (other arm_chip_xxx files are not included at the same time).
File arm_chip_stm32.h
Header scope legitimate use derogation authorized for:
Rule-5.6 - Required: unique typedef name (misra-c2012-5.6)
Rule-5.9 - Advisory: internal linkage unique function name (misra-c2012-5.9)
Justification: typedefs name are only defined once (other arm_chip_xxx files are not included at the same time).
File arm_inlines_stdclib.h

Header scope deviation has been granted for following rules:
Rule-18.4 - Advisory: +/- operators on pointer type (misra-c2012-18.4)

Header scope legitimate use derogation authorized for:
Rule-21.6 - Required: Use of <stdio.h> (misra-c2012-21.6)
Justification: Some of the following functions are sprintf like oriented extensions to standard library.
Rule-17.1 - Required: Use of <starg.h> (misra-c2012-17.1)
Justification: Legitimate use of variadic parameters received, passed to printf like function call.
Rule-20.7 - Required: Enclosed macro parameters expansion (misra-c2012-20.7)
Justification: Use of STR catenate macro in macros expansion.

File arm_keywords.h

Header scope deviation has been granted for following rules:
Rule-20.5 - Advisory: #undef (misra-c2012-20.5)

Header scope derogation to following rules:
Rule-21.1 - Required: #define and #undef on reserved identifiers (misra-c2012-21.1)
Justification: define generic CMSIS IO macros and keywords aliases in case not already defined.

File arm_macros.h
Header scope deviation has been granted for following rules:
Rule-1.2 - Advisory: Language extensions (misra-c2012-1.2)
Rule-20.5 - Advisory: #undef (misra-c2012-20.5)
File arm_preprocess.h

Header scope deviation has been granted for following rules:
Rule-20.5 - Advisory: #undef (misra-c2012-20.5)
Rule-20.10 - Advisory: # and ## preprocessor operators (misra-c2012-20.10)

Header scope legitimate use derogation authorized for:

File arm_typedefs.h

Header scope deviation has been granted for following rules:
Rule-2.3 - Advisory: unused type (misra-c2012-2.3)
Rule-19.2 - Advisory: union keyword (misra-c2012-19.2)
Rule-20.5 - Advisory: #undef (misra-c2012-20.5)

Header scope derogation authorized for:
Rule-5.5 - Required: Identifiers shall be distinct from macro name (misra-c2012-5.5)
Justification: Replacing B0 & B1 macro only for arduino platform.

Global eResetSource
Local deviation has been granted for following rules:
Rule-20.5 - Advisory: #undef (misra-c2012-20.5)
Global get_current_heap_address (void)
Local legitimate use derogation authorized for:
Rule-11.6 - Required: pointer to void cast to arithmetic (misra-c2012-11.6)
Justification: Intended to identify potential memory leaks in case of dynamic allocation use.
Global get_current_heap_address_int (void)
Local legitimate use derogation authorized for:
Rule-11.6 - Required: pointer to void cast to arithmetic (misra-c2012-11.6)
Rule-21.3 - Required: dynamic allocation (misra-c2012-21.3)
Justification: Intended to identify potential memory leaks in case of dynamic allocation use.
Global HALTICKS_PROTOTYPE (func)
Local derogation authorized for:
Rule-20.7 - Required: Enclosed macro parameters expansion (misra-c2012-20.7)
Justification: func parameter shall be a function name; raising error otherwise is intended.
Global isEven (v)
Local legitimate use derogation authorized for:
Rule-10.4 - Required: same essential type category (misra-c2012-10.4)
Justification: signed or unsigned use will produce the same result.
Global isOdd (v)
Local legitimate use derogation authorized for:
Rule-10.4 - Required: same essential type category (misra-c2012-10.4)
Justification: signed or unsigned use will produce the same result.
Global LINEAR_EVAL (name, val)
Local legitimate use derogation authorized for:
Rule-20.7 - Required: Enclosed macro parameters expansion (misra-c2012-20.7)
Justification: Result expansion of name wouldn't produce the desired structured access expansion.
Global LINEAR_TAB (name, nbElem)
Local deviation has been granted for following rules:
Rule-20.10 - Advisory: # and ## preprocessor operators (misra-c2012-20.10)
Global OFFSET_OF (typ, mbr)
Local deviation has been granted for following rules:
Rule-11.4 - Advisory: pointer to integer conversion (misra-c2012-11.4)
Local legitimate use derogation authorized for:
Rule-20.7 - Required: Enclosed macro parameters expansion (misra-c2012-20.7)
Justification: typ parameter would be cast instead of type.
Justification: mbr parameter shall be a structure member; will in any way raise an error in case not.
Global RESTRICTED_AVERAGE (typ_t, sum_t)
Function scope deviation granted for:
Rule-20.10 - Advisory: # and ## preprocessor operators (misra-c2012-20.10)
Local legitimate use derogation authorized for:
Rule-18.8 - Required: Var-length array types (misra-c2012-18.8)
Justification: pArray is used as array, makes sense to declare it in the same manner.
Justification: copy array needs to have a size and is always used in conjunction with nb.
Rule-20.7 - Required: Enclosed macro parameters expansion (misra-c2012-20.7)
Justification: typ_t parameter would always be used as cast and wouldn't catenate name.
Rule-20.12 - Required: macro parameter operand to # or ## (misra-c2012-20.12)
Justification: compliant use.
Global ROOT_OF (ptr, typ, mbr)
Local legitimate use derogation authorized for:
Rule-20.7 - Required: Enclosed macro parameters expansion (misra-c2012-20.7)
Justification: mbr parameter shall be a structure member; will in any way raise an error in case not.
Global rotate_2D (const sCoord2D c, const SWORD angle)
Function scope deviation granted for:
Rule-15.5 - Advisory: single point of exit (misra-c2012-15.5)
Struct sLinearFlexArray
Function scope derogation authorized for:
Rule-18.7 - Required: flexible array members (misra-c2012-18.7)
Justification: array being an array of array, this is a rather legitimate representation of object than a pointer.
Global SWAP_TYPE (a, b, typ)
Local legitimate use derogation authorized for:
Rule-20.7 - Required: Enclosed macro parameters expansion (misra-c2012-20.7)
Justification: typ parameter would be cast instead of type declaration (thus raising error); other parameters shall be variable names, raising error otherwise is intended.
Global SZ_ARRAY (arr)
local derogation authorized for:
Rule-20.7 - Required: Enclosed macro parameters expansion (misra-c2012-20.7)
Justification: Parenthesis doesn't make sense as parameter arr shall be an instance of type; raising error otherwise is intended.
Global SZ_OBJ (obj, typ)
Local legitimate use derogation authorized for:
Rule-20.7 - Required: Enclosed macro parameters expansion (misra-c2012-20.7)
Justification: obj parameter can be a type instead of an istance of type.
Justification: typ parameter would be cast instead of type.
Global SZ_TYP_MBR (typ, mbr)
Local deviation has been granted for following rules:
Rule-11.4 - Advisory: pointer to integer conversion (misra-c2012-11.4)
Local legitimate use derogation authorized for:
Rule-20.7 - Required: Enclosed macro parameters expansion (misra-c2012-20.7)
Justification: typ parameter would be cast instead of type.
Justification: mbr parameter shall be a structure member; will in any way raise an error in case not.
Global testEndian_full (void)
Function scope deviation granted for:
Rule-15.5 - Advisory: single point of exit (misra-c2012-15.5)
Rule-19.2 - Advisory: union keyword (misra-c2012-19.2)
Global TYP_MBR (typ, mbr)
Local legitimate use derogation authorized for:
Rule-20.7 - Required: Enclosed macro parameters expansion (misra-c2012-20.7)
Justification: typ parameter would be cast instead of type.
Justification: mbr parameter shall be a structure member; will in any way raise an error in case not.
Global VAL_AT (addr, typ)
Local legitimate use derogation authorized for:
Rule-20.7 - Required: Enclosed macro parameters expansion (misra-c2012-20.7)
Justification: typ parameter would be cast instead of type.