Configuration

Global Settings

  1. default_call_properties

    1. As configured, ECLAIR will:

      1. Consider, unless specified otherwise, as having argument pointee with index 1 or more with non-const type never read before being written for any call.

        -default_call_properties+="pointee_read(1..=never)","pointee_write(1..=always)","taken()"
      2. Consider, unless specified otherwise, as having argument pointee with index 1 or more with non-const type always written before return for any call.

        -default_call_properties+="pointee_read(1..=never)","pointee_write(1..=always)","taken()"
      3. Consider, unless specified otherwise, as taking no address arguments for any call.

        -default_call_properties+="pointee_read(1..=never)","pointee_write(1..=always)","taken()"
  2. project_name

    1. As configured, ECLAIR will:

      1. Set the project name to `qpc_4.5.02a_MC2_matrix'.

        -project_name=qpc_4.5.02a_MC2_matrix
  3. project_root

    1. As configured, ECLAIR will:

      1. Set the project root directory to `/home/joe/qpc_4.5.02a/'.

        -project_root=getenv("PROJECT_ROOT")
  4. reports

    1. The examples are not meant to comply with MISRA-C:2004.

      As configured, ECLAIR will:

      1. Add tag `justified' to a report where every area is an area where every location is a location in a file whose canonical path name matches the regex `^examples/.*$'.

        -reports+={justified,"all_area(all_loc(^examples/.*$))"}
    2. As configured, ECLAIR will:

      1. Hide a report matching `all_exp_external'.

        -reports+={hide,all_exp_external}

Service B.EXPLAIN: Explain user configuration

  1. tag

    1. As configured, ECLAIR will:

      1. Enable the service.

        -enable=B.EXPLAIN

Service B.REPORT.ECB: Output reports in ECB format

  1. macros

    1. As configured, ECLAIR will:

      1. Show up to 10 levels of macro expansions in report areas.

        -config=B.REPORT.ECB,macros=10
  2. output

    1. As configured, ECLAIR will:

      1. Write the reports output to file `/home/joe/qpc_4.5.02a/ECLAIR/FRAME.@FRAME@.ecb'.

        -config=B.REPORT.ECB,output=getenv("ECB_OUTPUT")
  3. preprocessed

    1. As configured, ECLAIR will:

      1. Show the preprocessed source for report areas with macro expansions.

        -config=B.REPORT.ECB,preprocessed=show
  4. tag

    1. As configured, ECLAIR will:

      1. Enable the service.

        -enable=B.REPORT.ECB
  5. tags

    1. As configured, ECLAIR will:

      1. Show the report tags with their origin.

        -config=B.REPORT.ECB,tags=show

Service MC2.1.1: Reports code that does not conform to the C90 standard

  1. summary

    1. As configured, ECLAIR will:

      1. Set the service summary to `Reports code that does not conform to the C90 standard'.

        -config=MC2.1.1,summary="Reports code that does not conform to the C90 standard"
  2. tag

    1. As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC2

Service MC2.1.2: Reports code that depends on any undefined or unspecified behavior as given by the C90 standard Annex G

  1. summary

    1. As configured, ECLAIR will:

      1. Set the service summary to `Reports code that depends on any undefined or unspecified behavior as given by the C90 standard Annex G'.

        -config=MC2.1.2,summary="Reports code that depends on any undefined or unspecified behavior as given by the C90 standard Annex G"
  2. tag

    1. As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC2

Service MC2.1.3: If more than one compiler and/or language is used to compile and link the source files, then there must be a common defined interface standard for object code to which these languages/compilers/assemblers conform

  1. summary

    1. As configured, ECLAIR will:

      1. Set the service summary to `If more than one compiler and/or language is used to compile and link the source files, then there must be a common defined interface standard for object code to which these languages/compilers/assemblers conform'.

        -config=MC2.1.3,summary="If more than one compiler and/or language is used to compile and link the source files, then there must be a common defined interface standard for object code to which these languages/compilers/assemblers conform"
  2. tag

    1. As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC2

Service MC2.1.4: Reports if the compiler used by the program is not specified as supporting 31 character significance and case sensitivity for external identifiers

  1. summary

    1. As configured, ECLAIR will:

      1. Set the service summary to `Reports if the compiler used by the program is not specified as supporting 31 character significance and case sensitivity for external identifiers'.

        -config=MC2.1.4,summary="Reports if the compiler used by the program is not specified as supporting 31 character significance and case sensitivity for external identifiers"
  2. tag

    1. As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC2

Service MC2.1.5: If floating-point types are used, then the floating-point standard used by the implementation must be documented

  1. summary

    1. As configured, ECLAIR will:

      1. Set the service summary to `If floating-point types are used, then the floating-point standard used by the implementation must be documented'.

        -config=MC2.1.5,summary="If floating-point types are used, then the floating-point standard used by the implementation must be documented"
  2. tag

    1. As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC2

Service MC2.2.1: Assembly language instructions must be encapsulated in assembler functions, in C functions that contain no other C code or in macros

  1. reports

    1. From page 5 of AN_QP-C_MISRA.pdf (and footnote 1 on page 9).

      As configured, ECLAIR will:

      1. Add tag `justified' to a report where every area is an area where every location is a location expanded from a macro whose name matches the regex `^(QF_INT_DISABLE|QF_INT_ENABLE|QF_CRIT_ENTRY|QF_CRIT_EXIT)$'.

        -config=MC2.2.1,reports+={justified,"all_area(all_loc(macro(^(QF_INT_DISABLE|QF_INT_ENABLE|QF_CRIT_ENTRY|QF_CRIT_EXIT)$)))"}
      2. Add tag `justified' to a report where every area is an area where every location is a location expanded from a macro whose name matches the regex `^(QK_ISR_ENTRY|QK_ISR_EXIT)$'.

        -config=MC2.2.1,reports+={justified,"all_area(all_loc(macro(^(QK_ISR_ENTRY|QK_ISR_EXIT)$)))"}
  2. summary

    1. As configured, ECLAIR will:

      1. Set the service summary to `Assembly language instructions must be encapsulated in assembler functions, in C functions that contain no other C code or in macros'.

        -config=MC2.2.1,summary="Assembly language instructions must be encapsulated in assembler functions, in C functions that contain no other C code or in macros"
  3. tag

    1. As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC2

Service MC2.2.2: Reports any comments not using the `/* ... */' style

  1. summary

    1. As configured, ECLAIR will:

      1. Set the service summary to `Reports any comments not using the `/* ... */' style'.

        -config=MC2.2.2,summary="Reports any comments not using the `/* ... */' style"
  2. tag

    1. As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC2

Service MC2.2.3: Reports any use of the character sequence `/*' inside a comment

  1. summary

    1. As configured, ECLAIR will:

      1. Set the service summary to `Reports any use of the character sequence `/*' inside a comment'.

        -config=MC2.2.3,summary="Reports any use of the character sequence `/*' inside a comment"
  2. tag

    1. As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC2

Service MC2.2.4: Reports sections of code that are commented out

  1. summary

    1. As configured, ECLAIR will:

      1. Set the service summary to `Reports sections of code that are commented out'.

        -config=MC2.2.4,summary="Reports sections of code that are commented out"
  2. tag

    1. As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC2

Service MC2.3.1: Any use of code that has implementation-defined behavior defined by Annex G.3 in the C90 standard, that is not specifically addressed by other MISRA rules, must be documented

  1. summary

    1. As configured, ECLAIR will:

      1. Set the service summary to `Any use of code that has implementation-defined behavior defined by Annex G.3 in the C90 standard, that is not specifically addressed by other MISRA rules, must be documented'.

        -config=MC2.3.1,summary="Any use of code that has implementation-defined behavior defined by Annex G.3 in the C90 standard, that is not specifically addressed by other MISRA rules, must be documented"
  2. tag

    1. As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC2

Service MC2.3.2: The source and execution character sets and the corresponding encoding must be documented

  1. summary

    1. As configured, ECLAIR will:

      1. Set the service summary to `The source and execution character sets and the corresponding encoding must be documented'.

        -config=MC2.3.2,summary="The source and execution character sets and the corresponding encoding must be documented"
  2. tag

    1. As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC2

Service MC2.3.3: If integer division is used, its expected direction of rounding in the chosen compiler must be documented

  1. summary

    1. As configured, ECLAIR will:

      1. Set the service summary to `If integer division is used, its expected direction of rounding in the chosen compiler must be documented'.

        -config=MC2.3.3,summary="If integer division is used, its expected direction of rounding in the chosen compiler must be documented"
  2. tag

    1. As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC2

Service MC2.3.4: Checks that each `#pragma' directive is documented

  1. summary

    1. As configured, ECLAIR will:

      1. Set the service summary to `Checks that each `#pragma' directive is documented'.

        -config=MC2.3.4,summary="Checks that each `#pragma' directive is documented"
  2. tag

    1. As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC2

Service MC2.3.5: If there is a reference to a `class', `struct' or `union' that contains a bit-field then the implementation-defined behaviour and packing of bit-fields must be documented

  1. summary

    1. As configured, ECLAIR will:

      1. Set the service summary to `If there is a reference to a `class', `struct' or `union' that contains a bit-field then the implementation-defined behaviour and packing of bit-fields must be documented'.

        -config=MC2.3.5,summary="If there is a reference to a `class', `struct' or `union' that contains a bit-field then the implementation-defined behaviour and packing of bit-fields must be documented"
  2. tag

    1. As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC2

Service MC2.3.6: Any libraries such as the standard libraries, third-party libraries or libraries designed in-house and used by the project must be written to be MISRA-compliant and subject to appropriate validation

  1. summary

    1. As configured, ECLAIR will:

      1. Set the service summary to `Any libraries such as the standard libraries, third-party libraries or libraries designed in-house and used by the project must be written to be MISRA-compliant and subject to appropriate validation'.

        -config=MC2.3.6,summary="Any libraries such as the standard libraries, third-party libraries or libraries designed in-house and used by the project must be written to be MISRA-compliant and subject to appropriate validation"
  2. tag

    1. As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC2

Service MC2.4.1: Reports any escape sequences that are not defined in the C90 standard

  1. summary

    1. As configured, ECLAIR will:

      1. Set the service summary to `Reports any escape sequences that are not defined in the C90 standard'.

        -config=MC2.4.1,summary="Reports any escape sequences that are not defined in the C90 standard"
  2. tag

    1. As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC2

Service MC2.4.2: Reports any trigraphs

  1. summary

    1. As configured, ECLAIR will:

      1. Set the service summary to `Reports any trigraphs'.

        -config=MC2.4.2,summary="Reports any trigraphs"
  2. tag

    1. As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC2

Service MC2.5.1: Identifiers (including macro names) must differ in their first 31 characters both before and after any macro expansion

  1. summary

    1. As configured, ECLAIR will:

      1. Set the service summary to `Identifiers (including macro names) must differ in their first 31 characters both before and after any macro expansion'.

        -config=MC2.5.1,summary="Identifiers (including macro names) must differ in their first 31 characters both before and after any macro expansion"
  2. tag

    1. As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC2

Service MC2.5.2: No identifier may use the same name as (and hence hide) an identifier in an outer scope

  1. summary

    1. As configured, ECLAIR will:

      1. Set the service summary to `No identifier may use the same name as (and hence hide) an identifier in an outer scope'.

        -config=MC2.5.2,summary="No identifier may use the same name as (and hence hide) an identifier in an outer scope"
  2. tag

    1. As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC2

Service MC2.5.3: A typedef name must not be used for any other entity

  1. summary

    1. As configured, ECLAIR will:

      1. Set the service summary to `A typedef name must not be used for any other entity'.

        -config=MC2.5.3,summary="A typedef name must not be used for any other entity"
  2. tag

    1. As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC2

Service MC2.5.4: A tag name must not be used for any other entity

  1. summary

    1. As configured, ECLAIR will:

      1. Set the service summary to `A tag name must not be used for any other entity'.

        -config=MC2.5.4,summary="A tag name must not be used for any other entity"
  2. tag

    1. As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC2

Service MC2.5.5: Any identifier of a variable or function with static storage duration must not be reused by any other any other entity anywhere

  1. summary

    1. As configured, ECLAIR will:

      1. Set the service summary to `Any identifier of a variable or function with static storage duration must not be reused by any other any other entity anywhere'.

        -config=MC2.5.5,summary="Any identifier of a variable or function with static storage duration must not be reused by any other any other entity anywhere"
  2. tag

    1. As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC2

Service MC2.5.6: Reports if an identifier in one namespace has the same name as another identifier in another namespace unless both of them are for `struct' or `union' members

  1. summary

    1. As configured, ECLAIR will:

      1. Set the service summary to `Reports if an identifier in one namespace has the same name as another identifier in another namespace unless both of them are for `struct' or `union' members'.

        -config=MC2.5.6,summary="Reports if an identifier in one namespace has the same name as another identifier in another namespace unless both of them are for `struct' or `union' members"
  2. tag

    1. As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC2

Service MC2.5.7: No entity may use the same identifier name as any other entity except when all the entities with the same name have the same declaration in a header file and that file is included in multiple source files

  1. summary

    1. As configured, ECLAIR will:

      1. Set the service summary to `No entity may use the same identifier name as any other entity except when all the entities with the same name have the same declaration in a header file and that file is included in multiple source files'.

        -config=MC2.5.7,summary="No entity may use the same identifier name as any other entity except when all the entities with the same name have the same declaration in a header file and that file is included in multiple source files"
  2. tag

    1. As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC2

Service MC2.6.1: A variable with plain `char' type must not be used for numeric values

  1. summary

    1. As configured, ECLAIR will:

      1. Set the service summary to `A variable with plain `char' type must not be used for numeric values'.

        -config=MC2.6.1,summary="A variable with plain `char' type must not be used for numeric values"
  2. tag

    1. As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC2

Service MC2.6.2: Variables with `unsigned' or `signed' `char' type must not be used for non-numeric values

  1. summary

    1. As configured, ECLAIR will:

      1. Set the service summary to `Variables with `unsigned' or `signed' `char' type must not be used for non-numeric values'.

        -config=MC2.6.2,summary="Variables with `unsigned' or `signed' `char' type must not be used for non-numeric values"
  2. tag

    1. As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC2

Service MC2.6.3: Reports any direct use of signed and unsigned variants of `char', `int', `short', `long', `long long', `float', `double' or `long double' and any typedef name for any of these variants that does not indicate the size and signedness

  1. summary

    1. As configured, ECLAIR will:

      1. Set the service summary to `Reports any direct use of signed and unsigned variants of `char', `int', `short', `long', `long long', `float', `double' or `long double' and any typedef name for any of these variants that does not indicate the size and signedness'.

        -config=MC2.6.3,summary="Reports any direct use of signed and unsigned variants of `char', `int', `short', `long', `long long', `float', `double' or `long double' and any typedef name for any of these variants that does not indicate the size and signedness"
  2. tag

    1. As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC2

Service MC2.6.4: Bitfields must be explicitly defined as `signed' `int' or `unsigned' `int'

  1. summary

    1. As configured, ECLAIR will:

      1. Set the service summary to `Bitfields must be explicitly defined as `signed' `int' or `unsigned' `int''.

        -config=MC2.6.4,summary="Bitfields must be explicitly defined as `signed' `int' or `unsigned' `int'"
  2. tag

    1. As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC2

Service MC2.6.5: Bitfields (even if unnamed) whose type is `signed' must have a length greater than 1 bit

  1. summary

    1. As configured, ECLAIR will:

      1. Set the service summary to `Bitfields (even if unnamed) whose type is `signed' must have a length greater than 1 bit'.

        -config=MC2.6.5,summary="Bitfields (even if unnamed) whose type is `signed' must have a length greater than 1 bit"
  2. tag

    1. As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC2

Service MC2.7.1: There must be no occurrence of an octal constant or an octal escape sequence

  1. summary

    1. As configured, ECLAIR will:

      1. Set the service summary to `There must be no occurrence of an octal constant or an octal escape sequence'.

        -config=MC2.7.1,summary="There must be no occurrence of an octal constant or an octal escape sequence"
  2. tag

    1. As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC2

Service MC2.8.1: A function must have a prototype declaration visible to its definition and before any reference to it

  1. summary

    1. As configured, ECLAIR will:

      1. Set the service summary to `A function must have a prototype declaration visible to its definition and before any reference to it'.

        -config=MC2.8.1,summary="A function must have a prototype declaration visible to its definition and before any reference to it"
  2. tag

    1. As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC2

Service MC2.8.2: In the declarations for variables, functions and typedefs the types must be explicitly stated

  1. summary

    1. As configured, ECLAIR will:

      1. Set the service summary to `In the declarations for variables, functions and typedefs the types must be explicitly stated'.

        -config=MC2.8.2,summary="In the declarations for variables, functions and typedefs the types must be explicitly stated"
  2. tag

    1. As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC2

Service MC2.8.3: The types of the corresponding parameters or return value in the prototype declarations and/or definition of a function must be identical (types that are identical use the same `typedef' names, the same desugared type and have the same qualifiers)

  1. summary

    1. As configured, ECLAIR will:

      1. Set the service summary to `The types of the corresponding parameters or return value in the prototype declarations and/or definition of a function must be identical (types that are identical use the same `typedef' names, the same desugared type and have the same qualifiers)'.

        -config=MC2.8.3,summary="The types of the corresponding parameters or return value in the prototype declarations and/or definition of a function must be identical (types that are identical use the same `typedef' names, the same desugared type and have the same qualifiers)"
  2. tag

    1. As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC2

Service MC2.8.4: Reports if multiple declarations or definition of the same variable or function have incompatible types

  1. summary

    1. As configured, ECLAIR will:

      1. Set the service summary to `Reports if multiple declarations or definition of the same variable or function have incompatible types'.

        -config=MC2.8.4,summary="Reports if multiple declarations or definition of the same variable or function have incompatible types"
  2. tag

    1. As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC2

Service MC2.8.5: Reports any variable or function definition in a header file

  1. summary

    1. As configured, ECLAIR will:

      1. Set the service summary to `Reports any variable or function definition in a header file'.

        -config=MC2.8.5,summary="Reports any variable or function definition in a header file"
  2. tag

    1. As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC2

Service MC2.8.6: Reports functions declared at block scope

  1. summary

    1. As configured, ECLAIR will:

      1. Set the service summary to `Reports functions declared at block scope'.

        -config=MC2.8.6,summary="Reports functions declared at block scope"
  2. tag

    1. As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC2

Service MC2.8.7: Reports any referenced variable that is global or has file scope and for which all references are in the same function

  1. reports

    1. From Section 5.1, page 21 of AN_QP-C_MISRA.pdf.

      As configured, ECLAIR will:

      1. Add tag `justified' to a report where every area is an area where every location is a location expanded from a macro whose name matches the regex `^(Q_DEFINE_THIS_MODULE|Q_DEFINE_THIS_FILE)$'.

        -config=MC2.8.7,reports+={justified,"all_area(all_loc(macro(^(Q_DEFINE_THIS_MODULE|Q_DEFINE_THIS_FILE)$)))"}
  2. summary

    1. As configured, ECLAIR will:

      1. Set the service summary to `Reports any referenced variable that is global or has file scope and for which all references are in the same function'.

        -config=MC2.8.7,summary="Reports any referenced variable that is global or has file scope and for which all references are in the same function"
  3. tag

    1. As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC2

Service MC2.8.8: Any variable or function with external linkage must be declared at most once in a header file

  1. summary

    1. As configured, ECLAIR will:

      1. Set the service summary to `Any variable or function with external linkage must be declared at most once in a header file'.

        -config=MC2.8.8,summary="Any variable or function with external linkage must be declared at most once in a header file"
  2. tag

    1. As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC2

Service MC2.8.9: Reports a variable or function with external linkage that is undefined or has more than one definition

  1. summary

    1. As configured, ECLAIR will:

      1. Set the service summary to `Reports a variable or function with external linkage that is undefined or has more than one definition'.

        -config=MC2.8.9,summary="Reports a variable or function with external linkage that is undefined or has more than one definition"
  2. tag

    1. As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC2

Service MC2.8.10: All declarations and definitions of variables or functions at file scope must have internal linkage unless external linkage is required

  1. summary

    1. As configured, ECLAIR will:

      1. Set the service summary to `All declarations and definitions of variables or functions at file scope must have internal linkage unless external linkage is required'.

        -config=MC2.8.10,summary="All declarations and definitions of variables or functions at file scope must have internal linkage unless external linkage is required"
  2. tag

    1. As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC2

Service MC2.8.11: Any variable or function declaration or definition with internal linkage must include the storage class specifier `static'

  1. summary

    1. As configured, ECLAIR will:

      1. Set the service summary to `Any variable or function declaration or definition with internal linkage must include the storage class specifier `static''.

        -config=MC2.8.11,summary="Any variable or function declaration or definition with internal linkage must include the storage class specifier `static'"
  2. tag

    1. As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC2

Service MC2.8.12: Any array declaration with external linkage must be initialized or the size must be explicitly stated

  1. summary

    1. As configured, ECLAIR will:

      1. Set the service summary to `Any array declaration with external linkage must be initialized or the size must be explicitly stated'.

        -config=MC2.8.12,summary="Any array declaration with external linkage must be initialized or the size must be explicitly stated"
  2. tag

    1. As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC2

Service MC2.9.1: All automatic variables must have a value written to them before being read

  1. summary

    1. As configured, ECLAIR will:

      1. Set the service summary to `All automatic variables must have a value written to them before being read'.

        -config=MC2.9.1,summary="All automatic variables must have a value written to them before being read"
  2. tag

    1. As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC2

Service MC2.9.2: All non-zero initialization of arrays or structures must use braces that match their structure

  1. summary

    1. As configured, ECLAIR will:

      1. Set the service summary to `All non-zero initialization of arrays or structures must use braces that match their structure'.

        -config=MC2.9.2,summary="All non-zero initialization of arrays or structures must use braces that match their structure"
  2. tag

    1. As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC2

Service MC2.9.3: Each enumeration initializer must initialise none, just the first or all the enumeration constants

  1. summary

    1. As configured, ECLAIR will:

      1. Set the service summary to `Each enumeration initializer must initialise none, just the first or all the enumeration constants'.

        -config=MC2.9.3,summary="Each enumeration initializer must initialise none, just the first or all the enumeration constants"
  2. tag

    1. As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC2

Service MC2.10.1: Reports if the value of an expression with integer type is implicitly converted to a different underlying type and one of the following holds: 1. the conversion is not to a wider integer type of the same signedness; 2. the expression is complex; 3. the expression is not constant and is a function argument; 4. the expression is not constant and is a return expression

  1. summary

    1. As configured, ECLAIR will:

      1. Set the service summary to `Reports if the value of an expression with integer type is implicitly converted to a different underlying type and one of the following holds: 1. the conversion is not to a wider integer type of the same signedness; 2. the expression is complex; 3. the expression is not constant and is a function argument; 4. the expression is not constant and is a return expression'.

        -config=MC2.10.1,summary="Reports if the value of an expression with integer type is implicitly converted to a different underlying type and one of the following holds: 1. the conversion is not to a wider integer type of the same signedness; 2. the expression is complex; 3. the expression is not constant and is a function argument; 4. the expression is not constant and is a return expression"
  2. tag

    1. As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC2

Service MC2.10.2: Reports the value of an expression with floating-point type that is implicitly converted to a different type and one of the following holds: 1. the conversion is not to a wider floating-point type; 2. the expression is complex; 3. the expression is a function argument; 4. the expression is a return expression

  1. summary

    1. As configured, ECLAIR will:

      1. Set the service summary to `Reports the value of an expression with floating-point type that is implicitly converted to a different type and one of the following holds: 1. the conversion is not to a wider floating-point type; 2. the expression is complex; 3. the expression is a function argument; 4. the expression is a return expression'.

        -config=MC2.10.2,summary="Reports the value of an expression with floating-point type that is implicitly converted to a different type and one of the following holds: 1. the conversion is not to a wider floating-point type; 2. the expression is complex; 3. the expression is a function argument; 4. the expression is a return expression"
  2. tag

    1. As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC2

Service MC2.10.3: The value of a complex expression of integer type must not be cast to a type that: 1. is wider than the underlying type of the expression, or 2. has a different signedness to that of the underlying type of the expression

  1. summary

    1. As configured, ECLAIR will:

      1. Set the service summary to `The value of a complex expression of integer type must not be cast to a type that: 1. is wider than the underlying type of the expression, or 2. has a different signedness to that of the underlying type of the expression'.

        -config=MC2.10.3,summary="The value of a complex expression of integer type must not be cast to a type that: 1. is wider than the underlying type of the expression, or 2. has a different signedness to that of the underlying type of the expression"
  2. tag

    1. As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC2

Service MC2.10.4: The value of a complex expression of floating-point type must not be cast to a wider floating-point type

  1. summary

    1. As configured, ECLAIR will:

      1. Set the service summary to `The value of a complex expression of floating-point type must not be cast to a wider floating-point type'.

        -config=MC2.10.4,summary="The value of a complex expression of floating-point type must not be cast to a wider floating-point type"
  2. tag

    1. As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC2

Service MC2.10.5: If an operand of `<<' or `~' has underlying type `unsigned' `char' or `short', then the result must be immediately cast to the underlying type of the operand

  1. summary

    1. As configured, ECLAIR will:

      1. Set the service summary to `If an operand of `<<' or `~' has underlying type `unsigned' `char' or `short', then the result must be immediately cast to the underlying type of the operand'.

        -config=MC2.10.5,summary="If an operand of `<<' or `~' has underlying type `unsigned' `char' or `short', then the result must be immediately cast to the underlying type of the operand"
  2. tag

    1. As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC2

Service MC2.10.6: Any integer constant whose magnitude is such that it is intrinsically unsigned must have a `U' or `u' suffix

  1. summary

    1. As configured, ECLAIR will:

      1. Set the service summary to `Any integer constant whose magnitude is such that it is intrinsically unsigned must have a `U' or `u' suffix'.

        -config=MC2.10.6,summary="Any integer constant whose magnitude is such that it is intrinsically unsigned must have a `U' or `u' suffix"
  2. tag

    1. As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC2

Service MC2.11.1: A function pointer must only be converted: 1. to or from an integer type; or 2. from a null pointer constant that was explicitly cast to `void*'

  1. reports

    1. From Section 6.1, page 23 of AN_QP-C_MISRA.pdf.

      As configured, ECLAIR will:

      1. Add tag `justified' to a report where every area is an area where every location is a location expanded from a macro whose name matches the regex `^(Q_TRAN|Q_SUPER|Q_STATE_CAST)$'.

        -config=MC2.11.1,reports+={justified,"all_area(all_loc(macro(^(Q_TRAN|Q_SUPER|Q_STATE_CAST)$)))"}
  2. summary

    1. As configured, ECLAIR will:

      1. Set the service summary to `A function pointer must only be converted: 1. to or from an integer type; or 2. from a null pointer constant that was explicitly cast to `void*''.

        -config=MC2.11.1,summary="A function pointer must only be converted: 1. to or from an integer type; or 2. from a null pointer constant that was explicitly cast to `void*'"
  3. tag

    1. As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC2

Service MC2.11.2: A pointer to a non-function may only be converted to or from: 1. an integral type, or 2. another pointer to object type, or 3. a pointer to void

  1. summary

    1. As configured, ECLAIR will:

      1. Set the service summary to `A pointer to a non-function may only be converted to or from: 1. an integral type, or 2. another pointer to object type, or 3. a pointer to void'.

        -config=MC2.11.2,summary="A pointer to a non-function may only be converted to or from: 1. an integral type, or 2. another pointer to object type, or 3. a pointer to void"
  2. tag

    1. As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC2

Service MC2.11.3: A pointer type must not be cast to an integer type and an integer type must not be cast to a pointer type

  1. reports

    1. From Section 5.2, page 21 of AN_QP-C_MISRA.pdf (and footnote 1, page 13).

      As configured, ECLAIR will:

      1. Add tag `justified' to a report where every area is an area where every location is a location expanded from a macro whose name matches the regex `^(QS_FUN|QS_OBJ)$'.

        -config=MC2.11.3,reports+={justified,"all_area(all_loc(macro(^(QS_FUN|QS_OBJ)$)))"}
    2. From footnote 2 on page 13 of AN_QP-C_MISRA.pdf.

      As configured, ECLAIR will:

      1. Add tag `justified' to a report where every area is an area where every location is a location expanded from a macro whose name matches the regex `^Q_UINT2PTR_CAST$'.

        -config=MC2.11.3,reports+={justified,"all_area(all_loc(macro(^Q_UINT2PTR_CAST$)))"}
  2. summary

    1. As configured, ECLAIR will:

      1. Set the service summary to `A pointer type must not be cast to an integer type and an integer type must not be cast to a pointer type'.

        -config=MC2.11.3,summary="A pointer type must not be cast to an integer type and an integer type must not be cast to a pointer type"
  3. tag

    1. As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC2

Service MC2.11.4: A pointer to non-function, non-void type must not be cast to a pointer to a different non-function, non-void type (the canonical form and ignoring any qualifications)

  1. reports

    1. As configured, ECLAIR will:

      1. Add tag `justified' to a report where every area is an area where every location is a location expanded from a macro whose name matches the regex `^(Q_TRAN|Q_SUPER|Q_STATE_CAST|Q_EVENT_CAST)$'.

        -config=MC2.11.4,reports+={justified,"all_area(all_loc(macro(^(Q_TRAN|Q_SUPER|Q_STATE_CAST|Q_EVENT_CAST)$)))"}
      2. Add tag `justified' to a report where every area is an area where every location is a location expanded from a macro whose name matches the regex `^Q_NEW$'.

        -config=MC2.11.4,reports+={justified,"all_area(all_loc(macro(^Q_NEW$)))"}
  2. summary

    1. As configured, ECLAIR will:

      1. Set the service summary to `A pointer to non-function, non-void type must not be cast to a pointer to a different non-function, non-void type (the canonical form and ignoring any qualifications)'.

        -config=MC2.11.4,summary="A pointer to non-function, non-void type must not be cast to a pointer to a different non-function, non-void type (the canonical form and ignoring any qualifications)"
  3. tag

    1. As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC2

Service MC2.11.5: A pointer to a type with a `const' or `volatile' qualifier must not be cast to a pointer to type without the qualifier

  1. reports

    1. From Section 5.3, page 21 of AN_QP-C_MISRA.pdf.

      As configured, ECLAIR will:

      1. Add tag `justified' to a report where every area is an area where every location is a location expanded from a macro whose name matches the regex `^(QF_EVT_REF_CTR_INC_|QF_EVT_REF_CTR_DEC_|QF_EPOOL_PUT_)$'.

        -config=MC2.11.5,reports+={justified,"all_area(all_loc(macro(^(QF_EVT_REF_CTR_INC_|QF_EVT_REF_CTR_DEC_|QF_EPOOL_PUT_)$)))"}
  2. summary

    1. As configured, ECLAIR will:

      1. Set the service summary to `A pointer to a type with a `const' or `volatile' qualifier must not be cast to a pointer to type without the qualifier'.

        -config=MC2.11.5,summary="A pointer to a type with a `const' or `volatile' qualifier must not be cast to a pointer to type without the qualifier"
  3. tag

    1. As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC2

Service MC2.12.1: Parentheses must be used in expressions to indicate the expected operator precedence

  1. summary

    1. As configured, ECLAIR will:

      1. Set the service summary to `Parentheses must be used in expressions to indicate the expected operator precedence'.

        -config=MC2.12.1,summary="Parentheses must be used in expressions to indicate the expected operator precedence"
  2. tag

    1. As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC2

Service MC2.12.2: The value of an expression must not depend on the unspecified order of evaluation defined in the C90 standard

  1. summary

    1. As configured, ECLAIR will:

      1. Set the service summary to `The value of an expression must not depend on the unspecified order of evaluation defined in the C90 standard'.

        -config=MC2.12.2,summary="The value of an expression must not depend on the unspecified order of evaluation defined in the C90 standard"
  2. tag

    1. As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC2

Service MC2.12.3: If a `sizeof' operator is applied to an expression, then that expression must be a (possibly volatile) object

  1. summary

    1. As configured, ECLAIR will:

      1. Set the service summary to `If a `sizeof' operator is applied to an expression, then that expression must be a (possibly volatile) object'.

        -config=MC2.12.3,summary="If a `sizeof' operator is applied to an expression, then that expression must be a (possibly volatile) object"
  2. tag

    1. As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC2

Service MC2.12.4: Reports if the right-hand operand of a logical `&&' or `||' operator contains side effects

  1. summary

    1. As configured, ECLAIR will:

      1. Set the service summary to `Reports if the right-hand operand of a logical `&&' or `||' operator contains side effects'.

        -config=MC2.12.4,summary="Reports if the right-hand operand of a logical `&&' or `||' operator contains side effects"
  2. tag

    1. As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC2

Service MC2.12.5: An operand of a logical `&&' or `||' operator must be either: 1. a primary expression (i.e., a single identifier, constant or parenthesized expression); or 2. a binary logical expression with the same operator

  1. summary

    1. As configured, ECLAIR will:

      1. Set the service summary to `An operand of a logical `&&' or `||' operator must be either: 1. a primary expression (i.e., a single identifier, constant or parenthesized expression); or 2. a binary logical expression with the same operator'.

        -config=MC2.12.5,summary="An operand of a logical `&&' or `||' operator must be either: 1. a primary expression (i.e., a single identifier, constant or parenthesized expression); or 2. a binary logical expression with the same operator"
  2. tag

    1. As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC2

Service MC2.12.6: Numeric and Boolean expressions should be placed in appropriate contexts

  1. summary

    1. As configured, ECLAIR will:

      1. Set the service summary to `Numeric and Boolean expressions should be placed in appropriate contexts'.

        -config=MC2.12.6,summary="Numeric and Boolean expressions should be placed in appropriate contexts"
  2. tag

    1. As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC2

Service MC2.12.6L: Numeric and Boolean expressions should be placed in appropriate contexts

  1. summary

    1. As configured, ECLAIR will:

      1. Set the service summary to `Numeric and Boolean expressions should be placed in appropriate contexts'.

        -config=MC2.12.6L,summary="Numeric and Boolean expressions should be placed in appropriate contexts"
  2. tag

    1. As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC2

Service MC2.12.7: Reports any the bitwise operators: `~', `<<', `<<=', `>>', `>>=', `&', `&=', `^', `^=', `|' and `|=' that are applied to operands whose underlying type is signed

  1. summary

    1. As configured, ECLAIR will:

      1. Set the service summary to `Reports any the bitwise operators: `~', `<<', `<<=', `>>', `>>=', `&', `&=', `^', `^=', `|' and `|=' that are applied to operands whose underlying type is signed'.

        -config=MC2.12.7,summary="Reports any the bitwise operators: `~', `<<', `<<=', `>>', `>>=', `&', `&=', `^', `^=', `|' and `|=' that are applied to operands whose underlying type is signed"
  2. tag

    1. As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC2

Service MC2.12.8: The value of the right-hand operand of a shift operator must lie between zero and one less than the width in bits of the underlying type of the left-hand operand

  1. reports

    1. From Section 5.4, page 21 of AN_QP-C_MISRA.pdf (and footnote 1 page 14).

      As configured, ECLAIR will:

      1. Add tag `justified' to a report where every area is an area where every location is a location expanded from a macro whose name matches the regex `^(QS_BEGIN_|QS_BEGIN_NOCRIT_)$'.

        -config=MC2.12.8,reports+={justified,"all_area(all_loc(macro(^(QS_BEGIN_|QS_BEGIN_NOCRIT_)$)))"}
  2. summary

    1. As configured, ECLAIR will:

      1. Set the service summary to `The value of the right-hand operand of a shift operator must lie between zero and one less than the width in bits of the underlying type of the left-hand operand'.

        -config=MC2.12.8,summary="The value of the right-hand operand of a shift operator must lie between zero and one less than the width in bits of the underlying type of the left-hand operand"
  3. tag

    1. As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC2

Service MC2.12.9: Reports a unary minus operator that is applied to an expression whose underlying type is unsigned

  1. summary

    1. As configured, ECLAIR will:

      1. Set the service summary to `Reports a unary minus operator that is applied to an expression whose underlying type is unsigned'.

        -config=MC2.12.9,summary="Reports a unary minus operator that is applied to an expression whose underlying type is unsigned"
  2. tag

    1. As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC2

Service MC2.12.10: Reports any use of the comma operator

  1. reports

    1. From Section 6.1, page 23 of AN_QP-C_MISRA.pdf.

      As configured, ECLAIR will:

      1. Add tag `justified' to a report where every area is an area where every location is a location expanded from a macro whose name matches the regex `^(Q_TRAN|Q_SUPER)$'.

        -config=MC2.12.10,reports+={justified,"all_area(all_loc(macro(^(Q_TRAN|Q_SUPER)$)))"}
  2. summary

    1. As configured, ECLAIR will:

      1. Set the service summary to `Reports any use of the comma operator'.

        -config=MC2.12.10,summary="Reports any use of the comma operator"
  3. tag

    1. As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC2

Service MC2.12.11: Any constant unsigned integer expression that leads to wrap-around may only occur within the context of an explicit cast

  1. summary

    1. As configured, ECLAIR will:

      1. Set the service summary to `Any constant unsigned integer expression that leads to wrap-around may only occur within the context of an explicit cast'.

        -config=MC2.12.11,summary="Any constant unsigned integer expression that leads to wrap-around may only occur within the context of an explicit cast"
  2. tag

    1. As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC2

Service MC2.12.12: There must be no access to an object of floating-point type via a `union' or via a pointer to a memory area where an object of floating-point type may be stored

  1. summary

    1. As configured, ECLAIR will:

      1. Set the service summary to `There must be no access to an object of floating-point type via a `union' or via a pointer to a memory area where an object of floating-point type may be stored'.

        -config=MC2.12.12,summary="There must be no access to an object of floating-point type via a `union' or via a pointer to a memory area where an object of floating-point type may be stored"
  2. tag

    1. As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC2

Service MC2.12.13: The increment or decrement operator must not be used when there is another side-effect in the same statement or if the result is used within that expression

  1. reports

    1. From Section 5.5, page 21 of AN_QP-C_MISRA.pdf (and footnote 3 page 14).

      As configured, ECLAIR will:

      1. Add tag `justified' to a report where every area is an area where every location is a location expanded from a macro whose name matches the regex `^QS_TEC_$'.

        -config=MC2.12.13,reports+={justified,"all_area(all_loc(macro(^QS_TEC_$)))"}
  2. summary

    1. As configured, ECLAIR will:

      1. Set the service summary to `The increment or decrement operator must not be used when there is another side-effect in the same statement or if the result is used within that expression'.

        -config=MC2.12.13,summary="The increment or decrement operator must not be used when there is another side-effect in the same statement or if the result is used within that expression"
  3. tag

    1. As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC2

Service MC2.13.1: In the object sources, reports an assignment operator that is used as an operand of a logical operator or as the condition part of a selection or iteration statement

  1. summary

    1. As configured, ECLAIR will:

      1. Set the service summary to `In the object sources, reports an assignment operator that is used as an operand of a logical operator or as the condition part of a selection or iteration statement'.

        -config=MC2.13.1,summary="In the object sources, reports an assignment operator that is used as an operand of a logical operator or as the condition part of a selection or iteration statement"
  2. tag

    1. As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC2

Service MC2.13.2: Any expression that does not have an effectively Boolean type must not used in a Boolean context

  1. summary

    1. As configured, ECLAIR will:

      1. Set the service summary to `Any expression that does not have an effectively Boolean type must not used in a Boolean context'.

        -config=MC2.13.2,summary="Any expression that does not have an effectively Boolean type must not used in a Boolean context"
  2. tag

    1. As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC2

Service MC2.13.3: Reports any floating-point expressions that are tested for equality or inequality

  1. summary

    1. As configured, ECLAIR will:

      1. Set the service summary to `Reports any floating-point expressions that are tested for equality or inequality'.

        -config=MC2.13.3,summary="Reports any floating-point expressions that are tested for equality or inequality"
  2. tag

    1. As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC2

Service MC2.13.4: Any variable, call expression, array subscript expression, member expression, complex expression or dereference expression with floating point type must not be used in the controlling part of a `for' statement

  1. summary

    1. As configured, ECLAIR will:

      1. Set the service summary to `Any variable, call expression, array subscript expression, member expression, complex expression or dereference expression with floating point type must not be used in the controlling part of a `for' statement'.

        -config=MC2.13.4,summary="Any variable, call expression, array subscript expression, member expression, complex expression or dereference expression with floating point type must not be used in the controlling part of a `for' statement"
  2. tag

    1. As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC2

Service MC2.13.5: Reports `for' statement loops that cannot be proved to have a finite number of iterations

  1. summary

    1. As configured, ECLAIR will:

      1. Set the service summary to `Reports `for' statement loops that cannot be proved to have a finite number of iterations'.

        -config=MC2.13.5,summary="Reports `for' statement loops that cannot be proved to have a finite number of iterations"
  2. tag

    1. As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC2

Service MC2.13.5L: Reports `for' statement loops that cannot be proved to have a finite number of iterations

  1. summary

    1. As configured, ECLAIR will:

      1. Set the service summary to `Reports `for' statement loops that cannot be proved to have a finite number of iterations'.

        -config=MC2.13.5L,summary="Reports `for' statement loops that cannot be proved to have a finite number of iterations"
  2. tag

    1. As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC2

Service MC2.13.6: A `for' statement loop counter must not be modified in the loop body

  1. summary

    1. As configured, ECLAIR will:

      1. Set the service summary to `A `for' statement loop counter must not be modified in the loop body'.

        -config=MC2.13.6,summary="A `for' statement loop counter must not be modified in the loop body"
  2. tag

    1. As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC2

Service MC2.13.7: A Boolean expression must not always have the same value

  1. reports

    1. From Section 5.4, page 21 of AN_QP-C_MISRA.pdf.

      As configured, ECLAIR will:

      1. Add tag `justified' to a report where every area is an area where every location is a location expanded from a macro whose name matches the regex `^(QS_BEGIN_|QS_BEGIN_NOCRIT_)$'.

        -config=MC2.13.7,reports+={justified,"all_area(all_loc(macro(^(QS_BEGIN_|QS_BEGIN_NOCRIT_)$)))"}
  2. summary

    1. As configured, ECLAIR will:

      1. Set the service summary to `A Boolean expression must not always have the same value'.

        -config=MC2.13.7,summary="A Boolean expression must not always have the same value"
  3. tag

    1. As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC2

Service MC2.14.1: Reports any unreachable code

  1. reports

    1. From Section 5.4, page 21 of AN_QP-C_MISRA.pdf.

      As configured, ECLAIR will:

      1. Add tag `justified' to a report where every area is an area where every location is a location expanded from a macro whose name matches the regex `^(QS_BEGIN_|QS_BEGIN_NOCRIT_)$'.

        -config=MC2.14.1,reports+={justified,"all_area(all_loc(macro(^(QS_BEGIN_|QS_BEGIN_NOCRIT_)$)))"}
  2. summary

    1. As configured, ECLAIR will:

      1. Set the service summary to `Reports any unreachable code'.

        -config=MC2.14.1,summary="Reports any unreachable code"
  3. tag

    1. As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC2

Service MC2.14.2: Reports any expression whose value is ignored and has no side-effects

  1. summary

    1. As configured, ECLAIR will:

      1. Set the service summary to `Reports any expression whose value is ignored and has no side-effects'.

        -config=MC2.14.2,summary="Reports any expression whose value is ignored and has no side-effects"
  2. tag

    1. As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC2

Service MC2.14.3: Reports a null statement that is not on a line by itself

  1. summary

    1. As configured, ECLAIR will:

      1. Set the service summary to `Reports a null statement that is not on a line by itself'.

        -config=MC2.14.3,summary="Reports a null statement that is not on a line by itself"
  2. tag

    1. As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC2

Service MC2.14.4: Reports any `goto' statement (indirect or direct)

  1. summary

    1. As configured, ECLAIR will:

      1. Set the service summary to `Reports any `goto' statement (indirect or direct)'.

        -config=MC2.14.4,summary="Reports any `goto' statement (indirect or direct)"
  2. tag

    1. As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC2

Service MC2.14.5: Reports any `continue' statement

  1. summary

    1. As configured, ECLAIR will:

      1. Set the service summary to `Reports any `continue' statement'.

        -config=MC2.14.5,summary="Reports any `continue' statement"
  2. tag

    1. As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC2

Service MC2.14.6: Reports if there is more than one `break' statement that may terminate a `do', `for', or `while' statement

  1. summary

    1. As configured, ECLAIR will:

      1. Set the service summary to `Reports if there is more than one `break' statement that may terminate a `do', `for', or `while' statement'.

        -config=MC2.14.6,summary="Reports if there is more than one `break' statement that may terminate a `do', `for', or `while' statement"
  2. tag

    1. As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC2

Service MC2.14.7: Reports any `return' statement that is not the last statement in a function

  1. summary

    1. As configured, ECLAIR will:

      1. Set the service summary to `Reports any `return' statement that is not the last statement in a function'.

        -config=MC2.14.7,summary="Reports any `return' statement that is not the last statement in a function"
  2. tag

    1. As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC2

Service MC2.14.8: Reports any `switch', `do', `for', or `while' statement that does not have its body enclosed in braces

  1. summary

    1. As configured, ECLAIR will:

      1. Set the service summary to `Reports any `switch', `do', `for', or `while' statement that does not have its body enclosed in braces'.

        -config=MC2.14.8,summary="Reports any `switch', `do', `for', or `while' statement that does not have its body enclosed in braces"
  2. tag

    1. As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC2

Service MC2.14.9: In an `if' statement: 1. the condition part must be immediately followed by a compound statement; 2. any `else' keyword must be followed by another `if' statement or by a compound statement

  1. summary

    1. As configured, ECLAIR will:

      1. Set the service summary to `In an `if' statement: 1. the condition part must be immediately followed by a compound statement; 2. any `else' keyword must be followed by another `if' statement or by a compound statement'.

        -config=MC2.14.9,summary="In an `if' statement: 1. the condition part must be immediately followed by a compound statement; 2. any `else' keyword must be followed by another `if' statement or by a compound statement"
  2. tag

    1. As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC2

Service MC2.14.10: Any `if' statement with `else if' clauses must have the final `else if' followed by an `else' clause or a comment

  1. summary

    1. As configured, ECLAIR will:

      1. Set the service summary to `Any `if' statement with `else if' clauses must have the final `else if' followed by an `else' clause or a comment'.

        -config=MC2.14.10,summary="Any `if' statement with `else if' clauses must have the final `else if' followed by an `else' clause or a comment"
  2. tag

    1. As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC2

Service MC2.15.0: A switch statement must be as defined in the normative text in Section 6.15, page 71 of MISRA-C:2004 that is not covered by the MISRA Rules 15.1, 15,2, 15.3, 15.4 and 15.5

  1. summary

    1. As configured, ECLAIR will:

      1. Set the service summary to `A switch statement must be as defined in the normative text in Section 6.15, page 71 of MISRA-C:2004 that is not covered by the MISRA Rules 15.1, 15,2, 15.3, 15.4 and 15.5'.

        -config=MC2.15.0,summary="A switch statement must be as defined in the normative text in Section 6.15, page 71 of MISRA-C:2004 that is not covered by the MISRA Rules 15.1, 15,2, 15.3, 15.4 and 15.5"
  2. tag

    1. As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC2

Service MC2.15.1: The scope of any `case' or `default' label must be the compound statement that forms the body of a `switch'

  1. summary

    1. As configured, ECLAIR will:

      1. Set the service summary to `The scope of any `case' or `default' label must be the compound statement that forms the body of a `switch''.

        -config=MC2.15.1,summary="The scope of any `case' or `default' label must be the compound statement that forms the body of a `switch'"
  2. tag

    1. As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC2

Service MC2.15.2: A `case' or `default' clause must either end with a `break' statement or the clause must be a compound statement whose last statement is a `break' statement

  1. summary

    1. As configured, ECLAIR will:

      1. Set the service summary to `A `case' or `default' clause must either end with a `break' statement or the clause must be a compound statement whose last statement is a `break' statement'.

        -config=MC2.15.2,summary="A `case' or `default' clause must either end with a `break' statement or the clause must be a compound statement whose last statement is a `break' statement"
  2. tag

    1. As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC2

Service MC2.15.3: Any `switch' statement must end with the `default' clause

  1. summary

    1. As configured, ECLAIR will:

      1. Set the service summary to `Any `switch' statement must end with the `default' clause'.

        -config=MC2.15.3,summary="Any `switch' statement must end with the `default' clause"
  2. tag

    1. As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC2

Service MC2.15.4: The value of any `switch' expression must not have essentially Boolean type

  1. summary

    1. As configured, ECLAIR will:

      1. Set the service summary to `The value of any `switch' expression must not have essentially Boolean type'.

        -config=MC2.15.4,summary="The value of any `switch' expression must not have essentially Boolean type"
  2. tag

    1. As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC2

Service MC2.15.5: Reports any `switch' statement that does not have a `case' label

  1. summary

    1. As configured, ECLAIR will:

      1. Set the service summary to `Reports any `switch' statement that does not have a `case' label'.

        -config=MC2.15.5,summary="Reports any `switch' statement that does not have a `case' label"
  2. tag

    1. As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC2

Service MC2.16.1: Functions must not be defined with ellipsis and there must be no use of standard library functions or macros with a variable number of arguments

  1. summary

    1. As configured, ECLAIR will:

      1. Set the service summary to `Functions must not be defined with ellipsis and there must be no use of standard library functions or macros with a variable number of arguments'.

        -config=MC2.16.1,summary="Functions must not be defined with ellipsis and there must be no use of standard library functions or macros with a variable number of arguments"
  2. tag

    1. As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC2

Service MC2.16.2: No function definition may call itself directly or indirectly via a chain of function calls

  1. summary

    1. As configured, ECLAIR will:

      1. Set the service summary to `No function definition may call itself directly or indirectly via a chain of function calls'.

        -config=MC2.16.2,summary="No function definition may call itself directly or indirectly via a chain of function calls"
  2. tag

    1. As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC2

Service MC2.16.3: Checks that each parameter declaration in a function prototype declaration has an identifier

  1. summary

    1. As configured, ECLAIR will:

      1. Set the service summary to `Checks that each parameter declaration in a function prototype declaration has an identifier'.

        -config=MC2.16.3,summary="Checks that each parameter declaration in a function prototype declaration has an identifier"
  2. tag

    1. As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC2

Service MC2.16.4: Parameter declarations that are in matching positions in two declarations or definitions for the same function must have the same identifiers

  1. summary

    1. As configured, ECLAIR will:

      1. Set the service summary to `Parameter declarations that are in matching positions in two declarations or definitions for the same function must have the same identifiers'.

        -config=MC2.16.4,summary="Parameter declarations that are in matching positions in two declarations or definitions for the same function must have the same identifiers"
  2. tag

    1. As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC2

Service MC2.16.5: All function declarations must have non-empty parameter lists

  1. summary

    1. As configured, ECLAIR will:

      1. Set the service summary to `All function declarations must have non-empty parameter lists'.

        -config=MC2.16.5,summary="All function declarations must have non-empty parameter lists"
  2. tag

    1. As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC2

Service MC2.16.6: Any call to a function must have an explicit protoype declaration, and the number of arguments passed to the function must match the number of parameters in the prototype

  1. summary

    1. As configured, ECLAIR will:

      1. Set the service summary to `Any call to a function must have an explicit protoype declaration, and the number of arguments passed to the function must match the number of parameters in the prototype'.

        -config=MC2.16.6,summary="Any call to a function must have an explicit protoype declaration, and the number of arguments passed to the function must match the number of parameters in the prototype"
  2. tag

    1. As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC2

Service MC2.16.7: Any pointer parameter in a function prototype that is not used to modify the addressed object must be declared as pointer to `const'

  1. declarations

    1. From Section 5.6, page 22 of AN_QP-C_MISRA.pdf.

      As configured, ECLAIR will:

      1. Add tag `justified' to any report apropos of a declaration that satisfies `__function_decls' && $A:

        1. $A matches a declaration whose name matches the regex `^(QActive_start|QActive_stop).*$'.

        -config=MC2.16.7,declarations={justified,"__function_decls&&^(QActive_start|QActive_stop).*$"}
  2. summary

    1. As configured, ECLAIR will:

      1. Set the service summary to `Any pointer parameter in a function prototype that is not used to modify the addressed object must be declared as pointer to `const''.

        -config=MC2.16.7,summary="Any pointer parameter in a function prototype that is not used to modify the addressed object must be declared as pointer to `const'"
  3. tag

    1. As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC2

Service MC2.16.8: Any non-void function definition must not have: 1. a return statement with an empty expression; 2. any exit path that does not terminate with a return statement

  1. summary

    1. As configured, ECLAIR will:

      1. Set the service summary to `Any non-void function definition must not have: 1. a return statement with an empty expression; 2. any exit path that does not terminate with a return statement'.

        -config=MC2.16.8,summary="Any non-void function definition must not have: 1. a return statement with an empty expression; 2. any exit path that does not terminate with a return statement"
  2. tag

    1. As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC2

Service MC2.16.9: A function identifier must be preceded by `&' or followed by, a possibly empty, parenthesized list of call arguments

  1. summary

    1. As configured, ECLAIR will:

      1. Set the service summary to `A function identifier must be preceded by `&' or followed by, a possibly empty, parenthesized list of call arguments'.

        -config=MC2.16.9,summary="A function identifier must be preceded by `&' or followed by, a possibly empty, parenthesized list of call arguments"
  2. tag

    1. As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC2

Service MC2.16.10: If a function returns a value that contains some error information, then the value of a call to that function must not be cast to `void' and any error information must be checked

  1. summary

    1. As configured, ECLAIR will:

      1. Set the service summary to `If a function returns a value that contains some error information, then the value of a call to that function must not be cast to `void' and any error information must be checked'.

        -config=MC2.16.10,summary="If a function returns a value that contains some error information, then the value of a call to that function must not be cast to `void' and any error information must be checked"
  2. tag

    1. As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC2

Service MC2.17.1: If an integer is added to or subtracted from a pointer, then that pointer must point to an array or an array element

  1. summary

    1. As configured, ECLAIR will:

      1. Set the service summary to `If an integer is added to or subtracted from a pointer, then that pointer must point to an array or an array element'.

        -config=MC2.17.1,summary="If an integer is added to or subtracted from a pointer, then that pointer must point to an array or an array element"
  2. tag

    1. As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC2

Service MC2.17.2: If one pointer is subtracted from another pointer, then both pointers must point to elements in the same array

  1. summary

    1. As configured, ECLAIR will:

      1. Set the service summary to `If one pointer is subtracted from another pointer, then both pointers must point to elements in the same array'.

        -config=MC2.17.2,summary="If one pointer is subtracted from another pointer, then both pointers must point to elements in the same array"
  2. tag

    1. As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC2

Service MC2.17.3: If any of the operators `>', `>=', `<', `<=' are used to compare the values of pointers then both operands must point to elements in the same array

  1. reports

    1. From Section 5.7, page 22 of AN_QP-C_MISRA.pdf.

      As configured, ECLAIR will:

      1. Add tag `justified' to a report where every area is an area where every location is a location expanded from a macro whose name matches the regex `^QF_PTR_RANGE_$'.

        -config=MC2.17.3,reports+={justified,"all_area(all_loc(macro(^QF_PTR_RANGE_$)))"}
  2. summary

    1. As configured, ECLAIR will:

      1. Set the service summary to `If any of the operators `>', `>=', `<', `<=' are used to compare the values of pointers then both operands must point to elements in the same array'.

        -config=MC2.17.3,summary="If any of the operators `>', `>=', `<', `<=' are used to compare the values of pointers then both operands must point to elements in the same array"
  3. tag

    1. As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC2

Service MC2.17.4: There must be no pointer arithmetic except for array indexing where the indexed object is explicitly declared to have an array type

  1. reports

    1. From Section 5.8, page 22 of AN_QP-C_MISRA.pdf.

      As configured, ECLAIR will:

      1. Add tag `justified' to a report where every area is an area where every location is a location expanded from a macro whose name matches the regex `^QF_PTR_AT_$'.

        -config=MC2.17.4,reports+={justified,"all_area(all_loc(macro(^QF_PTR_AT_$)))"}
  2. summary

    1. As configured, ECLAIR will:

      1. Set the service summary to `There must be no pointer arithmetic except for array indexing where the indexed object is explicitly declared to have an array type'.

        -config=MC2.17.4,summary="There must be no pointer arithmetic except for array indexing where the indexed object is explicitly declared to have an array type"
  3. tag

    1. As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC2

Service MC2.17.5: Reports if the declared type of an object has more than 2 levels of pointer indirection

  1. summary

    1. As configured, ECLAIR will:

      1. Set the service summary to `Reports if the declared type of an object has more than 2 levels of pointer indirection'.

        -config=MC2.17.5,summary="Reports if the declared type of an object has more than 2 levels of pointer indirection"
  2. tag

    1. As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC2

Service MC2.17.6: An object with automatic storage must not have its address: 1. assigned to another automatic object of larger scope; or 2. assigned to a static object; or 3. returned by a function

  1. summary

    1. As configured, ECLAIR will:

      1. Set the service summary to `An object with automatic storage must not have its address: 1. assigned to another automatic object of larger scope; or 2. assigned to a static object; or 3. returned by a function'.

        -config=MC2.17.6,summary="An object with automatic storage must not have its address: 1. assigned to another automatic object of larger scope; or 2. assigned to a static object; or 3. returned by a function"
  2. tag

    1. As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC2

Service MC2.18.1: Reports any structure or union declaration with incomplete type that is referenced in a translation unit

  1. summary

    1. As configured, ECLAIR will:

      1. Set the service summary to `Reports any structure or union declaration with incomplete type that is referenced in a translation unit'.

        -config=MC2.18.1,summary="Reports any structure or union declaration with incomplete type that is referenced in a translation unit"
  2. tag

    1. As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC2

Service MC2.18.2: Reports if an object may be assigned to an overlapping object

  1. summary

    1. As configured, ECLAIR will:

      1. Set the service summary to `Reports if an object may be assigned to an overlapping object'.

        -config=MC2.18.2,summary="Reports if an object may be assigned to an overlapping object"
  2. tag

    1. As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC2

Service MC2.18.3: There must be documentation that states if and how an area of memory may be reused for unrelated data

  1. summary

    1. As configured, ECLAIR will:

      1. Set the service summary to `There must be documentation that states if and how an area of memory may be reused for unrelated data'.

        -config=MC2.18.3,summary="There must be documentation that states if and how an area of memory may be reused for unrelated data"
  2. tag

    1. As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC2

Service MC2.18.4: There must be no `union' declaration, no declaration whose type is a `union', or any use of a `union' type

  1. declarations

    1. From Section 5.9, page 22 of AN_QP-C_MISRA.pdf.

      As configured, ECLAIR will:

      1. Add tag `justified' to any report apropos of a declaration that satisfies $A && $B:

        1. $A matches a function definition.

        2. $B matches a declaration whose name matches the regex `^(QF_f32|QF_f64).*$'.

        -config=MC2.18.4,declarations={justified,"node(function_defn)&&^(QF_f32|QF_f64).*$"}
  2. summary

    1. As configured, ECLAIR will:

      1. Set the service summary to `There must be no `union' declaration, no declaration whose type is a `union', or any use of a `union' type'.

        -config=MC2.18.4,summary="There must be no `union' declaration, no declaration whose type is a `union', or any use of a `union' type"
  3. tag

    1. As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC2

Service MC2.19.1: Reports if an `#include' directive is preceded by any code apart from other preprocessor directives or comments

  1. summary

    1. As configured, ECLAIR will:

      1. Set the service summary to `Reports if an `#include' directive is preceded by any code apart from other preprocessor directives or comments'.

        -config=MC2.19.1,summary="Reports if an `#include' directive is preceded by any code apart from other preprocessor directives or comments"
  2. tag

    1. As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC2

Service MC2.19.2: The characters `'', `\', `"', or `/*' must not be used between `<' and `>' delimiters and the characters `'', `\' or `/*' must not be used between `"' delimiters in a header name preprocessing token

  1. summary

    1. As configured, ECLAIR will:

      1. Set the service summary to `The characters `'', `\', `"', or `/*' must not be used between `<' and `>' delimiters and the characters `'', `\' or `/*' must not be used between `"' delimiters in a header name preprocessing token'.

        -config=MC2.19.2,summary="The characters `'', `\\', `\"', or `/*' must not be used between `<' and `>' delimiters and the characters `'', `\\' or `/*' must not be used between `\"' delimiters in a header name preprocessing token"
  2. tag

    1. As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC2

Service MC2.19.3: Reports any `#include' directive that is not followed by a filename delimited by `<'`>' or double quotes

  1. summary

    1. As configured, ECLAIR will:

      1. Set the service summary to `Reports any `#include' directive that is not followed by a filename delimited by `<'`>' or double quotes'.

        -config=MC2.19.3,summary="Reports any `#include' directive that is not followed by a filename delimited by `<'`>' or double quotes"
  2. tag

    1. As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC2

Service MC2.19.4: A macro body must not have unbalanced brackets and may only expand to one of the following: a braced initialiser, a constant, a string literal, a parenthesized expression, a type qualifier, a storage class specifier, or a do-while-zero loop idiom

  1. summary

    1. As configured, ECLAIR will:

      1. Set the service summary to `A macro body must not have unbalanced brackets and may only expand to one of the following: a braced initialiser, a constant, a string literal, a parenthesized expression, a type qualifier, a storage class specifier, or a do-while-zero loop idiom'.

        -config=MC2.19.4,summary="A macro body must not have unbalanced brackets and may only expand to one of the following: a braced initialiser, a constant, a string literal, a parenthesized expression, a type qualifier, a storage class specifier, or a do-while-zero loop idiom"
  2. tag

    1. As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC2

Service MC2.19.5: The `#define' or `#undef' directive must never occur inside a block

  1. summary

    1. As configured, ECLAIR will:

      1. Set the service summary to `The `#define' or `#undef' directive must never occur inside a block'.

        -config=MC2.19.5,summary="The `#define' or `#undef' directive must never occur inside a block"
  2. tag

    1. As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC2

Service MC2.19.6: Reports any use of the `#undef' directive

  1. summary

    1. As configured, ECLAIR will:

      1. Set the service summary to `Reports any use of the `#undef' directive'.

        -config=MC2.19.6,summary="Reports any use of the `#undef' directive"
  2. tag

    1. As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC2

Service MC2.19.7: An invocation of a function-like macro should not be replaceable by a function call

  1. reports

    1. From Section 5.10, page 22 of AN_QP-C_MISRA.pdf.

      As configured, ECLAIR will:

      1. Add tag `justified' to a report where every area is an area where every location is a location expanded from a macro whose name matches the regex `^(Q_DIM|Q_UINT2PTR_CAST)$'.

        -config=MC2.19.7,reports+={justified,"all_area(all_loc(macro(^(Q_DIM|Q_UINT2PTR_CAST)$)))"}
      2. Add tag `justified' to a report where every area is an area where every location is a location expanded from a macro whose name matches the regex `^(Q_ASSERT|Q_ASSERT_ID|Q_ALLEGE|Q_ALLEGE_ID|Q_ERROR|Q_ERROR_ID|Q_REQUIRE|Q_REQUIRE_ID|Q_ENSURE|Q_ENSURE_ID|Q_INVARIANT|Q_INVARIANT_ID|Q_ASSERT_COMPILE|Q_DEFINE_THIS_MODULE)$'.

        -config=MC2.19.7,reports+={justified,"all_area(all_loc(macro(^(Q_ASSERT|Q_ASSERT_ID|Q_ALLEGE|Q_ALLEGE_ID|Q_ERROR|Q_ERROR_ID|Q_REQUIRE|Q_REQUIRE_ID|Q_ENSURE|Q_ENSURE_ID|Q_INVARIANT|Q_INVARIANT_ID|Q_ASSERT_COMPILE|Q_DEFINE_THIS_MODULE)$)))"}
      3. Add tag `justified' to a report where every area is an area where every location is a location expanded from a macro whose name matches the regex `^(Q_ROM_BYTE|QFsm_ctor|QFsm_state|QHsm_ctor|QHsm_state|Q_IGNORED|Q_HANDLED|Q_UNHANDLED|Q_TRAN|Q_SUPER|Q_STATE_CAST|Q_EVT_CAST)$'.

        -config=MC2.19.7,reports+={justified,"all_area(all_loc(macro(^(Q_ROM_BYTE|QFsm_ctor|QFsm_state|QHsm_ctor|QHsm_state|Q_IGNORED|Q_HANDLED|Q_UNHANDLED|Q_TRAN|Q_SUPER|Q_STATE_CAST|Q_EVT_CAST)$)))"}
      4. Add tag `justified' to a report where every area is an area where every location is a location expanded from a macro whose name matches the regex `^(QF_INT_DISABLE|QF_INT_ENABLE|QF_CRIT_ENTRY|QF_CRIT_EXIT|QF_TICK|QF_PUBLISH|QF_MPOOL_EL|QACTIVE_POST|Q_NEW)$'.

        -config=MC2.19.7,reports+={justified,"all_area(all_loc(macro(^(QF_INT_DISABLE|QF_INT_ENABLE|QF_CRIT_ENTRY|QF_CRIT_EXIT|QF_TICK|QF_PUBLISH|QF_MPOOL_EL|QACTIVE_POST|Q_NEW)$)))"}
      5. Add tag `justified' to a report where every area is an area where every location is a location expanded from a macro whose name matches the regex `^(QEQueue_getNFree|QPSet8_isEmpty|QPSet8_notEmpty|QPSet8_hasElement|QPSet8_insert|QPSet8_remove|QPSet8_findMax|QPSet64_isEmpty|QPSet64_notEmpty|QPSet64_hasElement|QPSet64_insert|QPSet64_remove|QPSet64_findMax|QActive_ctor|QTimeEvt_postIn|QTimeEvt_postEvery)$'.

        -config=MC2.19.7,reports+={justified,"all_area(all_loc(macro(^(QEQueue_getNFree|QPSet8_isEmpty|QPSet8_notEmpty|QPSet8_hasElement|QPSet8_insert|QPSet8_remove|QPSet8_findMax|QPSet64_isEmpty|QPSet64_notEmpty|QPSet64_hasElement|QPSet64_insert|QPSet64_remove|QPSet64_findMax|QActive_ctor|QTimeEvt_postIn|QTimeEvt_postEvery)$)))"}
      6. Add tag `justified' to a report where every area is an area where every location is a location expanded from a macro whose name matches the regex `^(QF_QS_CRIT_EXIT|QF_QS_CRIT_ENTRY|QF_QS_CRIT_EXIT|QF_QS_ISR_ENTRY|QF_QS_ISR_EXIT|QF_QS_ACTION)$'.

        -config=MC2.19.7,reports+={justified,"all_area(all_loc(macro(^(QF_QS_CRIT_EXIT|QF_QS_CRIT_ENTRY|QF_QS_CRIT_EXIT|QF_QS_ISR_ENTRY|QF_QS_ISR_EXIT|QF_QS_ACTION)$)))"}
      7. Add tag `justified' to a report where every area is an area where every location is a location expanded from a macro whose name matches the regex `^(QACTIVE_EQUEUE_WAIT_|QACTIVE_EQUEUE_SIGNAL_|QACTIVE_EQUEUE_ONEMPTY_|QF_EPOOL_INIT_|QF_EPOOL_EVENT_SIZE_|QF_EPOOL_GET_|QF_EPOOL_PUT_|QF_ACTIVE_CTOR_|QF_ACTIVE_INIT_|QF_ACTIVE_DISPATCH_)$'.

        -config=MC2.19.7,reports+={justified,"all_area(all_loc(macro(^(QACTIVE_EQUEUE_WAIT_|QACTIVE_EQUEUE_SIGNAL_|QACTIVE_EQUEUE_ONEMPTY_|QF_EPOOL_INIT_|QF_EPOOL_EVENT_SIZE_|QF_EPOOL_GET_|QF_EPOOL_PUT_|QF_ACTIVE_CTOR_|QF_ACTIVE_INIT_|QF_ACTIVE_DISPATCH_)$)))"}
      8. Add tag `justified' to a report where every area is an area where every location is a location expanded from a macro whose name matches the regex `^(QK_ISR_ENTRY|QK_ISR_EXIT|QK_EXT_SAVE|QK_EXT_RESTORE|QK_TLS)$'.

        -config=MC2.19.7,reports+={justified,"all_area(all_loc(macro(^(QK_ISR_ENTRY|QK_ISR_EXIT|QK_EXT_SAVE|QK_EXT_RESTORE|QK_TLS)$)))"}
      9. Add tag `justified' to a report where every area is an area where every location is a location expanded from a macro whose name matches the regex `^(QS_INIT|QS_EXIT|QS_DUMP|QS_RESET|QS_FILTER_ON|QS_FILTER_OFF|QS_FILTER_SM_OBJ|QS_FILTER_AO_OBJ|QS_FILTER_MP_OBJ|QS_FILTER_EQ_OBJ|QS_FILTER_TE_OBJ|QS_FILTER_AP_OBJ|QS_GET_BYTE|QS_GET_BLOCK|QS_BEGIN|QS_END|QS_BEGIN_NOCRIT|QS_END_NOCRIT)$'.

        -config=MC2.19.7,reports+={justified,"all_area(all_loc(macro(^(QS_INIT|QS_EXIT|QS_DUMP|QS_RESET|QS_FILTER_ON|QS_FILTER_OFF|QS_FILTER_SM_OBJ|QS_FILTER_AO_OBJ|QS_FILTER_MP_OBJ|QS_FILTER_EQ_OBJ|QS_FILTER_TE_OBJ|QS_FILTER_AP_OBJ|QS_GET_BYTE|QS_GET_BLOCK|QS_BEGIN|QS_END|QS_BEGIN_NOCRIT|QS_END_NOCRIT)$)))"}
      10. Add tag `justified' to a report where every area is an area where every location is a location expanded from a macro whose name matches the regex `^(QS_I8|QS_U8|QS_I16|QS_U16|QS_I32|QS_I64|QS_U32|QS_F32|QS_F64|QS_U64|QS_U32_HEX|QS_STR|QS_OBJ|QS_FUN|QS_SIG_DICTIONARY|QS_OBJ_DICTIONARY|QS_FUN_DICTIONARY|QS_USR_DICTIONARY|QS_ASSERTION|QS_FLUSH|QS_STR_ROM|QS_MEM|QS_SIG)$'.

        -config=MC2.19.7,reports+={justified,"all_area(all_loc(macro(^(QS_I8|QS_U8|QS_I16|QS_U16|QS_I32|QS_I64|QS_U32|QS_F32|QS_F64|QS_U64|QS_U32_HEX|QS_STR|QS_OBJ|QS_FUN|QS_SIG_DICTIONARY|QS_OBJ_DICTIONARY|QS_FUN_DICTIONARY|QS_USR_DICTIONARY|QS_ASSERTION|QS_FLUSH|QS_STR_ROM|QS_MEM|QS_SIG)$)))"}
      11. Add tag `justified' to a report where every area is an area where every location is a location expanded from a macro whose name matches the regex `^(QS_CRIT_ENTRY_|QS_CRIT_EXIT_|QS_BEGIN_|QS_END_|QS_BEGIN_NOCRIT_|QS_END_NOCRIT_|QS_U8_|QS_U16_|QS_U32_|QS_U64_|QS_STR_|QS_STR_ROM_|QS_TIME_|QS_SIG_|QS_EVS_|QS_OBJ_|QS_FUN_|QS_EQC_|QS_MPC_|QS_MPS_|QS_TEC_)$'.

        -config=MC2.19.7,reports+={justified,"all_area(all_loc(macro(^(QS_CRIT_ENTRY_|QS_CRIT_EXIT_|QS_BEGIN_|QS_END_|QS_BEGIN_NOCRIT_|QS_END_NOCRIT_|QS_U8_|QS_U16_|QS_U32_|QS_U64_|QS_STR_|QS_STR_ROM_|QS_TIME_|QS_SIG_|QS_EVS_|QS_OBJ_|QS_FUN_|QS_EQC_|QS_MPC_|QS_MPS_|QS_TEC_)$)))"}
      12. Add tag `justified' to a report where every area is an area where every location is a location expanded from a macro whose name matches the regex `^(QEP_TRIG_|QEP_ENTER_|QEP_EXIT_)$'.

        -config=MC2.19.7,reports+={justified,"all_area(all_loc(macro(^(QEP_TRIG_|QEP_ENTER_|QEP_EXIT_)$)))"}
      13. Add tag `justified' to a report where every area is an area where every location is a location expanded from a macro whose name matches the regex `^(QF_EVT_REF_CTR_INC_|QF_EVT_REF_CTR_DEC_|QF_EVT_POOL_ID_|QF_EVT_REF_CTR_|QF_PTR_AT_|QF_CRIT_ENTRY_|QF_CRIT_EXIT_|QF_PTR_RANGE_|QF_MPOOL_EL)$'.

        -config=MC2.19.7,reports+={justified,"all_area(all_loc(macro(^(QF_EVT_REF_CTR_INC_|QF_EVT_REF_CTR_DEC_|QF_EVT_POOL_ID_|QF_EVT_REF_CTR_|QF_PTR_AT_|QF_CRIT_ENTRY_|QF_CRIT_EXIT_|QF_PTR_RANGE_|QF_MPOOL_EL)$)))"}
      14. Add tag `justified' to a report where every area is an area where every location is a location expanded from a macro whose name matches the regex `^(QS_INSERT_BYTE|QS_INSERT_ESC_BYTE|QS_INSERT_CHKSUM_BYTE|QS_PTR_AT_|QS_PTR_INC_)$'.

        -config=MC2.19.7,reports+={justified,"all_area(all_loc(macro(^(QS_INSERT_BYTE|QS_INSERT_ESC_BYTE|QS_INSERT_CHKSUM_BYTE|QS_PTR_AT_|QS_PTR_INC_)$)))"}
      15. Add tag `justified' to a report where every area is an area where every location is a location expanded from a macro whose name matches the regex `^(PHILO_ID|RIGHT|LEFT)$'.

        -config=MC2.19.7,reports+={justified,"all_area(all_loc(macro(^(PHILO_ID|RIGHT|LEFT)$)))"}
  2. summary

    1. As configured, ECLAIR will:

      1. Set the service summary to `An invocation of a function-like macro should not be replaceable by a function call'.

        -config=MC2.19.7,summary="An invocation of a function-like macro should not be replaceable by a function call"
  3. tag

    1. As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC2

Service MC2.19.8: Any call to a function-like macro must have the same number of arguments as the number of parameters in the macro's definition and all its arguments must be non-empty

  1. summary

    1. As configured, ECLAIR will:

      1. Set the service summary to `Any call to a function-like macro must have the same number of arguments as the number of parameters in the macro's definition and all its arguments must be non-empty'.

        -config=MC2.19.8,summary="Any call to a function-like macro must have the same number of arguments as the number of parameters in the macro's definition and all its arguments must be non-empty"
  2. tag

    1. As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC2

Service MC2.19.9: No argument to a call to a function-like macro may be a single `#' or contain a `#' followed by a directive name (other than as part of a comment, character literal or string literal)

  1. summary

    1. As configured, ECLAIR will:

      1. Set the service summary to `No argument to a call to a function-like macro may be a single `#' or contain a `#' followed by a directive name (other than as part of a comment, character literal or string literal)'.

        -config=MC2.19.9,summary="No argument to a call to a function-like macro may be a single `#' or contain a `#' followed by a directive name (other than as part of a comment, character literal or string literal)"
  2. tag

    1. As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC2

Service MC2.19.10: Any occurrence of a macro parameter in the macro's body must be enclosed in parentheses unless it is: 1. an operand for the `#' or `##' operators; 2. (possibly indirectly) the identifier for a field reference

  1. summary

    1. As configured, ECLAIR will:

      1. Set the service summary to `Any occurrence of a macro parameter in the macro's body must be enclosed in parentheses unless it is: 1. an operand for the `#' or `##' operators; 2. (possibly indirectly) the identifier for a field reference'.

        -config=MC2.19.10,summary="Any occurrence of a macro parameter in the macro's body must be enclosed in parentheses unless it is: 1. an operand for the `#' or `##' operators; 2. (possibly indirectly) the identifier for a field reference"
  2. tag

    1. As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC2

Service MC2.19.11: No undefined macro may be used unless it is the argument to an `#ifdef' or `#ifndef' directive or the `defined()' operator

  1. summary

    1. As configured, ECLAIR will:

      1. Set the service summary to `No undefined macro may be used unless it is the argument to an `#ifdef' or `#ifndef' directive or the `defined()' operator'.

        -config=MC2.19.11,summary="No undefined macro may be used unless it is the argument to an `#ifdef' or `#ifndef' directive or the `defined()' operator"
  2. tag

    1. As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC2

Service MC2.19.12: Reports any macro body that contains more than one occurrence of the `#' or `##' operators

  1. summary

    1. As configured, ECLAIR will:

      1. Set the service summary to `Reports any macro body that contains more than one occurrence of the `#' or `##' operators'.

        -config=MC2.19.12,summary="Reports any macro body that contains more than one occurrence of the `#' or `##' operators"
  2. tag

    1. As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC2

Service MC2.19.13: Reports any use of the `#' and `##' preprocessor operators

  1. summary

    1. As configured, ECLAIR will:

      1. Set the service summary to `Reports any use of the `#' and `##' preprocessor operators'.

        -config=MC2.19.13,summary="Reports any use of the `#' and `##' preprocessor operators"
  2. tag

    1. As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC2

Service MC2.19.14: The `defined' operator must be used in the form `defined(Macro_Id)' or `defined Macro_Id'

  1. summary

    1. As configured, ECLAIR will:

      1. Set the service summary to `The `defined' operator must be used in the form `defined(Macro_Id)' or `defined Macro_Id''.

        -config=MC2.19.14,summary="The `defined' operator must be used in the form `defined(Macro_Id)' or `defined Macro_Id'"
  2. tag

    1. As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC2

Service MC2.19.15: Any file that is the subject of an `#include' directive must have a mechanism to avoid the file being included more than once

  1. summary

    1. As configured, ECLAIR will:

      1. Set the service summary to `Any file that is the subject of an `#include' directive must have a mechanism to avoid the file being included more than once'.

        -config=MC2.19.15,summary="Any file that is the subject of an `#include' directive must have a mechanism to avoid the file being included more than once"
  2. tag

    1. As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC2

Service MC2.19.16: Reports errors in the preprocessing directives even when excluded by conditional compilation

  1. summary

    1. As configured, ECLAIR will:

      1. Set the service summary to `Reports errors in the preprocessing directives even when excluded by conditional compilation'.

        -config=MC2.19.16,summary="Reports errors in the preprocessing directives even when excluded by conditional compilation"
  2. tag

    1. As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC2

Service MC2.19.17: No preprocessor conditional constructs may span multiple files

  1. summary

    1. As configured, ECLAIR will:

      1. Set the service summary to `No preprocessor conditional constructs may span multiple files'.

        -config=MC2.19.17,summary="No preprocessor conditional constructs may span multiple files"
  2. tag

    1. As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC2

Service MC2.20.1: No `#define' or `#undef' directive may be used on a reserved identifier, macro or function in the standard library or keyword

  1. summary

    1. As configured, ECLAIR will:

      1. Set the service summary to `No `#define' or `#undef' directive may be used on a reserved identifier, macro or function in the standard library or keyword'.

        -config=MC2.20.1,summary="No `#define' or `#undef' directive may be used on a reserved identifier, macro or function in the standard library or keyword"
  2. tag

    1. As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC2

Service MC2.20.2: No declaration may use a reserved identifier, macro or function in the standard library

  1. summary

    1. As configured, ECLAIR will:

      1. Set the service summary to `No declaration may use a reserved identifier, macro or function in the standard library'.

        -config=MC2.20.2,summary="No declaration may use a reserved identifier, macro or function in the standard library"
  2. tag

    1. As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC2

Service MC2.20.3: There must be appropriate checks of values passed to standard libraries that have restricted input domains

  1. summary

    1. As configured, ECLAIR will:

      1. Set the service summary to `There must be appropriate checks of values passed to standard libraries that have restricted input domains'.

        -config=MC2.20.3,summary="There must be appropriate checks of values passed to standard libraries that have restricted input domains"
  2. tag

    1. As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC2

Service MC2.20.4: No standard function related to heap manipulation and dynamic memory allocation and deallocation may be used

  1. summary

    1. As configured, ECLAIR will:

      1. Set the service summary to `No standard function related to heap manipulation and dynamic memory allocation and deallocation may be used'.

        -config=MC2.20.4,summary="No standard function related to heap manipulation and dynamic memory allocation and deallocation may be used"
  2. tag

    1. As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC2

Service MC2.20.5: Reports any use of the standard library error indicators

  1. summary

    1. As configured, ECLAIR will:

      1. Set the service summary to `Reports any use of the standard library error indicators'.

        -config=MC2.20.5,summary="Reports any use of the standard library error indicators"
  2. tag

    1. As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC2

Service MC2.20.6: Reports any use of the standard library macro `offsetof'

  1. summary

    1. As configured, ECLAIR will:

      1. Set the service summary to `Reports any use of the standard library macro `offsetof''.

        -config=MC2.20.6,summary="Reports any use of the standard library macro `offsetof'"
  2. tag

    1. As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC2

Service MC2.20.7: Reports any use of the standard library macro `setjmp' and function `longjmp'

  1. summary

    1. As configured, ECLAIR will:

      1. Set the service summary to `Reports any use of the standard library macro `setjmp' and function `longjmp''.

        -config=MC2.20.7,summary="Reports any use of the standard library macro `setjmp' and function `longjmp'"
  2. tag

    1. As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC2

Service MC2.20.8: Reports the inclusion of the standard library header `signal.h' and any use of its macros or functions

  1. summary

    1. As configured, ECLAIR will:

      1. Set the service summary to `Reports the inclusion of the standard library header `signal.h' and any use of its macros or functions'.

        -config=MC2.20.8,summary="Reports the inclusion of the standard library header `signal.h' and any use of its macros or functions"
  2. tag

    1. As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC2

Service MC2.20.9: Reports the inclusion of the standard library header `stdio.h' and any use of its macros or functions

  1. summary

    1. As configured, ECLAIR will:

      1. Set the service summary to `Reports the inclusion of the standard library header `stdio.h' and any use of its macros or functions'.

        -config=MC2.20.9,summary="Reports the inclusion of the standard library header `stdio.h' and any use of its macros or functions"
  2. tag

    1. As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC2

Service MC2.20.10: Reports any use of the standard library functions `atof', `atoi' and `atol' provided by `stdlib.h'

  1. summary

    1. As configured, ECLAIR will:

      1. Set the service summary to `Reports any use of the standard library functions `atof', `atoi' and `atol' provided by `stdlib.h''.

        -config=MC2.20.10,summary="Reports any use of the standard library functions `atof', `atoi' and `atol' provided by `stdlib.h'"
  2. tag

    1. As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC2

Service MC2.20.11: Reports any use of the standard library functions `abort', `exit', `getenv' and `system' provided by `stdlib.h'

  1. summary

    1. As configured, ECLAIR will:

      1. Set the service summary to `Reports any use of the standard library functions `abort', `exit', `getenv' and `system' provided by `stdlib.h''.

        -config=MC2.20.11,summary="Reports any use of the standard library functions `abort', `exit', `getenv' and `system' provided by `stdlib.h'"
  2. tag

    1. As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC2

Service MC2.20.12: Reports the inclusion of the standard library header `time.h' and any use of its functions, members, structs or types provided by `time.h' or the function `wcsftime' provided by `wchar.h'

  1. summary

    1. As configured, ECLAIR will:

      1. Set the service summary to `Reports the inclusion of the standard library header `time.h' and any use of its functions, members, structs or types provided by `time.h' or the function `wcsftime' provided by `wchar.h''.

        -config=MC2.20.12,summary="Reports the inclusion of the standard library header `time.h' and any use of its functions, members, structs or types provided by `time.h' or the function `wcsftime' provided by `wchar.h'"
  2. tag

    1. As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC2

Service MC2.21.1: Reports if possible runtime unexpected behavior countermeasures are not documented

  1. summary

    1. As configured, ECLAIR will:

      1. Set the service summary to `Reports if possible runtime unexpected behavior countermeasures are not documented'.

        -config=MC2.21.1,summary="Reports if possible runtime unexpected behavior countermeasures are not documented"
  2. tag

    1. As configured, ECLAIR will:

      1. Enable the service.

        -enable=MC2