/* >>>------------------------------------------------------------ * * File: rule_5.5.c, Module: M2CM-3.2-QAC-8.1.2 * * RULE 5.5 (Advisory): * No object or function identifier with static storage duration * should be reused. * * Implemented by messages: * 1525 Object/function with external linkage has same * identifier as another object/function with internal * linkage. * * 1526 Object with no linkage has same identifier as another * object/function with external linkage. * * 1527 Object/function with internal linkage has same * identifier as another object/function with internal * linkage. * * 1528 Object with no linkage has same identifier as another * object/function with internal linkage. * * 1529 Object with no linkage has same identifier as another * object with static storage duration but no linkage. * * <<<------------------------------------------------------------ */ #include "misra.h" #include "m2cmex.h" static S16 obj_0505a = 0; /* MISRA Violation - Declared with external linkage in main.c */ static S16 obj_0505c = 0; /* MISRA Violation - Declared with internal linkage in main.c */ static S16 test_0505a(void); extern S16 test_0505( void ) { return test_0505a() + obj_0505a + obj_0505c; } static S16 test_0505a(void) { S16 obj_0505b; /* MISRA Violation - Declared with internal linkage in main.c */ S16 obj_0505d = get_s16(); /* MISRA Violation - Declared with internal linkage in main.c */ S16 obj_0505e = get_s16(); obj_0505b = s16a + obj_0505c + obj_0505d + obj_0505e; return obj_0505a + obj_0505b; }