MISRA C rules and violations for MicroC-MXF

You must follow MISRA C rules when you generate MISRA C compliant code using MicroC-MXF.

Purpose

The following represents a list of known rules violations:
Table 1. Rhapsody-C 7.5.3/ mxf MisraC rules and violations
MISRA Rule MISRA Rule Description Rhapsody-C 7.5.3/ mxf Compliance Status Violation Description, Comments
98 2004
93 (A) 19.7 (A) Functions and macros Not compliant. Used to provide better performance in some environments that do not support efficient functions inlining.
96 (R) 19.10 (R) Not compliant, in some specific places called from the mxf code. Can be avoided by not using the specific constructs listed in the description here. Not compliant, from some places in the OXF code.
Parameters encapsulation:
  1. Parameter used as type for data declaration
  2. Parameter used as the operand of ## (Misra compliant)
N/A 19.13 (A) The # and ## preprocessor operators must not be used. Not compliant. Used to provide better flexibility of the .mxf file.
The following represent further descriptions and examples for Rhapsody-C 7.5.3/ mxf MISRA C compliancy: :
  • MISRA rule #93 (R): A function must be used in preference to a function-like macro.

    Violation description: Macros are used instead of functions to be more efficient and provide better performance in some environments that do not support efficient functions inlining.

    #define RiCGEN(INSTANCE,EVENT) 									\
       ((INSTANCE) != NULL) ? RiCReactive_gen(&((INSTANCE)->ric_reactive),	(EVENT), RiCFALSE): RiCFALSE 

Feedback