/* >>>------------------------------------------------------------ * * File: rule_11.4.c, Module: M2CM-3.2-QAC-8.1.2 * * RULE 11.4 (Advisory): * A cast should not be performed between a pointer to object type * and a different pointer to object type. * * Implemented by messages: * 310 Casting to different object pointer type. * * 316 [I] Cast from a pointer to void to a pointer to object * type. * * 317 [I] Implicit conversion from a pointer to void to a * pointer to object type. * * <<<------------------------------------------------------------ */ /* PRQA S 2983,3203 ++ */ #include "misra.h" #include "m2cmex.h" extern S16 test_1104( void ) { S32 * pi4 = 0; S16 * pi2; S8 * pi1; F32 * pf; pi2 = (S16 *)pi4; /* MISRA Violation */ pi1 = (S8 *)pi4; /* MISRA Violation */ pf = (F32 *)pi4; /* MISRA Violation */ return 0; }