CMSIS-RTOS RTX tries to be MISRA-C compliant as much as possible. However, there are some violations in order to simplify the overall code logic and to generate more efficient code.
CMSIS-RTOS RTX generates the following notes, warnings and infos for MISRA-C:2004 rules:
- Rule 1.1, required, Rule 2.2, required: Non-ANSI reserved word or construct: '//'
 
- Rule 1.2, required: Both sides have side effects
 
- Rule 1.2, required: Unusual pointer cast (incompatible indirect types)
 
- Rule 8.1, required: Function defined without a prototype in scope
 
- Rule 11.1, required, Rule 11.3, advisory: cast from pointer to unsigned int
 
- Rule 11.1, required, Rule 11.3, advisory: cast from unsigned int to pointer
 
- Rule 11.4, advisory: cast from pointer to pointer
 
- Rule 12.11, advisory: Overflow in computing constant for operation: 'unsigned shift left'
 
- Rule 13.7, required, Rule 14.1, required: Constant value Boolean
 
- Rule 14.4, required: Use of goto is deprecated
 
- Rule 14.7, required: Return statement before end of function
 
- Rule 16.10, required: Ignoring return value of function
 
- Rule 17.2, required, Rule 17.3, required: Relational or subtract operator applied to pointers
 
- Rule 19.4, required, Rule 19.10, required: Expression-like macro not parenthesized
 
- Rule 19.15, required: Repeated include file
 
CMSIS-RTOS RTX violates the following MISRA-C:2004 rules:
- Required Rule 8.5: object/function definition in header file
 
- Required Rule 10.1: Prohibited Implicit Conversion: Non-constant argument to function
 
- Required Rule 10.1: Implicit conversion of complex integer expression
 
- Required Rule 10.3: Cast of complex integer expression to larger type
 
- Required Rule 10.3: Cast of complex expression changes signedness
 
- Required Rule 11.5: attempt to cast away const/volatile from a pointer or reference
 
- Required Rule 12.4: side effects on right hand of logical operator: '&&'
 
- Required Rule 12.4: side effects on right hand of logical operator: '||'
 
- Required Rule 12.5: non-primary expression used with logical operator
 
- Required Rule 14.3: null statement not in line by itself
 
- Required Rule 14.8: left brace expected for while, do...while and for
 
- Required Rule 14.9: left brace expected for if and else
 
- Required Rule 15.3: default missing from switch statement
 
- Required Rule 16.9: function identifier used without '&' or parenthesized parameter list
 
- Required Rule 17.4: pointer arithmetic other than array indexing used
 
- Required Rule 18.4: declaration of union type or object of union type: '{...}'
 
- Required Rule 19.12: Multiple use of '#/##' operators in definition of macro
 
- Required Rule 20.2: Re-use of C90 identifier pattern
 
- Advisory Rule 12.1: dependence placed on C's operator precedence; operators: '+' and '-'
 
- Advisory Rule 12.13: increment or decrement combined with another operator
 
- Advisory Rule 19.13: '#/##' operator used in macro
 
- Advisory Rule 19.7: Function-like macro defined