/* >>>------------------------------------------------------------ * * File: rule_8.7.c, Module: M2CM-3.2-QAC-8.1.2 * * RULE 8.7 (Required): * Objects shall be defined at block scope if they are only * accessed from within a single function. * * Implemented by messages: * 1514 The object '%1s' is only referenced by function '%2s', * in the translation unit where it is defined * * 3218 File scope static, '%s', is only accessed in one * function. * * <<<------------------------------------------------------------ */ #include "misra.h" #include "m2cmex.h" static S16 s0807a; /* MISRA Violation - Only referenced in function test_0807a */ static S16 s0807b; /* MISRA Violation - Only referenced in function test_0807b */ extern S16 obj_0807c = 0; /* MISRA Violation - Only referenced in function test_0807b */ extern S16 test_0807a( void ) { s0807a += s16a; return s0807a; } extern S16 test_0807b( void ) { s0807b = s16b; obj_0807c = s16a; return s0807b + obj_0807c; }