Abraxas/Misra Home  Table of Contents

Module - m35.html

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

Misra-C Test Suite for Module - m35.c

/* Misra C Enforcement Testing */

Misra C Enforcement Testing */

/* Rule 35: Required */

Rule 35: Required */

/* Assignment operators shall not be used in expressions which return */

Assignment operators shall not be used in expressions which return */

/* Boolean values. */

Boolean values. */
#include "misra.h"
SI_32
rule35 ( void ) 



Function Name: rule35()

{
    
SI_32 a = 3;
SI_32 b = 3;
SI_32 c = 3;
    
    if ( a == 3 ) 
    {
        
        c = 1;
        
    }
    
    if ( ( a = b ) != 0 ) /*  RULE 35  */
    {
        
        c = 1;
        
    }
    
    if ( a = b ) /*  RULE 35  */
    {
        
        c = 1;
        
    }
    
    return c;
    
}

Abraxas/Misra Home  Table of Contents

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