/* >>>------------------------------------------------------------ * * File: rule_7.1.c, Module: M2CM-3.2-QAC-8.1.2 * * RULE 7.1 (Required): * Octal constants (other than zero) and octal escape sequences * shall not be used. * * Implemented by messages: * 336 Macro defined as an octal constant. * * 339 Octal constant used. * * 3628 Octal escape sequences used in a character constant or * string literal. * * <<<------------------------------------------------------------ */ /* PRQA S 2983,2984,3203,3205 ++ */ #include "misra.h" #include "m2cmex.h" #define MRET 015 /* MISRA Violation */ extern S16 test_0701( void ) { S16 i; S16 j; S16 k; PC pcx; PC buf[] = "ABC\15"; /* MISRA Violation */ i = 0xFF; /* Hex is OK */ j = 052; /* MISRA Violation */ k = MRET; pcx = '\15'; /* MISRA Violation */ return i + j + k; }