/* >>>------------------------------------------------------------ * * File: rule_17.5.c, Module: M2CM-3.2-QAC-8.1.2 * * RULE 17.5 (Advisory): * The declaration of objects should contain no more than 2 levels * of pointer indirection. * * Implemented by messages: * 3260 Typedef defined with more than 2 levels of indirection. * * 3261 Member of struct/union defined with more than 2 levels * of indirection. * * 3262 Object defined or declared with more than 2 levels of * indirection. * * 3263 Function defined or declared with a return type which * has more than 2 levels of indirection. * * <<<------------------------------------------------------------ */ /* PRQA S 2983,3203,3205 ++ */ #include "misra.h" #include "m2cmex.h" typedef S8 * CHARSTAR; typedef U16 *** PPPU; /* MISRA Violation */ static S16 test_1705a( S8 ** const ptr[] ); /* MISRA Violation */ extern S16 test_1705( void ) { S16 r; S8 tab[ 4 ]; S8 *ptr1; S8 **ptr2; S8 ***ptr3; /* MISRA Violation */ CHARSTAR **ptr4; /* MISRA Violation */ CHARSTAR *const * const ptr5; /* MISRA Violation */ ptr1 = &tab[ 0 ]; ptr2 = &ptr1; ptr3 = &ptr2; r = test_1705a( ptr3 ); return r; } static S16 test_1705a( S8 ** const ptr[] ) /* MISRA Violation */ { S8 c; c = ***ptr; return 0; }