/* >>>------------------------------------------------------------ * * File: rule_13.4.c, Module: M2CM-3.2-QAC-8.1.2 * * RULE 13.4 (Required): * The controlling expression of a for statement shall not contain * any objects of floating type. * * Implemented by messages: * 3340 Floating point variable used as 'for' loop control * variable. * * 3342 Controlling expression of 'for' loop is a floating point * comparison. * * <<<------------------------------------------------------------ */ #include "misra.h" #include "m2cmex.h" extern S16 test_1304( void ) { F32 f32x; S16 s16x = 0; for ( f32x = 0.0F; f32x < f32a; f32x++ ) /* MISRA Violation */ { ++s16x; } return s16x; }