Abraxas/Misra Home  Table of Contents

Module - m66.html

ABRAXAS SOFTWARE - CodeCheck MISRA Test-Suite Misra-C:1998 Misra-C:2004.

Misra-C Test Suite for Module - m66.c

/* Misra C Enforcement Testing */

Misra C Enforcement Testing */

/* Rule 66: Advisory */

Rule 66: Advisory */

/* Only expressions concerned with loop control should appear within a */

Only expressions concerned with loop control should appear within a */

/* for statement. */

for statement. */

/* This is in general difficult to detect automatically and statically. */

This is in general difficult to detect automatically and statically. */

/* The following gives a simple case. */

The following gives a simple case. */
#include "misra.h"
SI_32
rule66 ( void ) 



Function Name: rule66()

{
    
SI_32 c = 3;
    
SI_32 i = 3;
SI_32 x = 3;
    
    for ( i = 0; i < 10; ++i, ( x = 8 ) ) /*  RULE 66  */
    {
        

/* DO NOTHING */

DO NOTHING */
        
    }
    
    return c;
    
}

Abraxas/Misra Home  Table of Contents

ABRAXAS SOFTWARE - CodeCheck MISRA Test-Suite Misra-C:1998 Misra-C:2004.