Commit 2a291a73 authored by shengnan hu's avatar shengnan hu
Browse files

main

parents
#include <malloc.h>
#include <stdlib.h>
int main ( void )
{
int *x; //违背1
//...
x = ( int * ) malloc ( sizeof ( int ) );
if ( NULL != x )
{
*x = 1;
}
else
{
return ( -1 );
}
return ( 0 );
}
#include <malloc.h>
#include <stdlib.h>
int main ( void )
{
int *x = NULL; //遵循1
//...
x = ( int * ) malloc ( sizeof ( int ) );
if ( NULL != x )
{
*x = 1;
}
else
{
return ( -1 );
}
return ( 0 );
}
#include <malloc.h>
#include <stdlib.h>
int main ( void )
{
int *x = NULL; //遵循1
//...
x = ( int * ) malloc ( sizeof ( int ) );
if ( NULL != x )
{
*x = 1;
}
else
{
return ( -1 );
}
return ( 0 );
}
#include <malloc.h>
int main ( void )
{
int *x = ( int * ) malloc ( sizeof ( int ) );
*x = 1; //违背1
return ( 0 );
}
#include <malloc.h>
int main ( void )
{
int *x = ( int * ) malloc ( sizeof ( int ) );
*x = 1; //违背1
return ( 0 );
}
#include <malloc.h>
#include <stdlib.h>
int main ( void )
{
int *x = ( int * ) malloc ( sizeof ( int ) );
if ( NULL != x ) //遵循1
{
*x = 1;
}
else
{
return ( -1 );
}
return ( 0 );
}
#include <malloc.h>
#include <stdlib.h>
int main ( void )
{
int *x = ( int * ) malloc ( sizeof ( int ) );
if ( NULL != x ) //遵循1
{
*x = 1;
}
else
{
return ( -1 );
}
return ( 0 );
}
#include <malloc.h>
#include <stdlib.h>
int main ( void )
{
int *x = ( int * ) malloc ( sizeof ( int ) );
if ( x != 0 ) //违背1
{
*x = 1;
}
else
{
return ( -1 );
}
return ( 0 );
}
#include <malloc.h>
#include <stdlib.h>
int main ( void )
{
int *x = ( int * ) malloc ( sizeof ( int ) );
if ( x != 0 ) //违背1
{
*x = 1;
}
else
{
return ( -1 );
}
return ( 0 );
}
#include <malloc.h>
#include <stdlib.h>
int main ( void )
{
int *x = ( int * ) malloc ( sizeof ( int ) );
if ( NULL != x ) //遵循1
{
*x = 1;
}
else
{
return ( -1 );
}
return ( 0 );
}
#include <malloc.h>
#include <stdlib.h>
int main ( void )
{
int *x = ( int * ) malloc ( sizeof ( int ) );
if ( NULL != x ) //遵循1
{
*x = 1;
}
else
{
return ( -1 );
}
return ( 0 );
}
int main ( void )
{
int i = 0, j = 0;
double x = 0.0;
//..
if ( 0 == i )
{
x = 1.0;
}
else if ( 1 == i )
{
x = 2.0;
} //违背1
if ( 0 == j )
{
x = x + 5.0;
}
return ( 0 );
}
int main ( void )
{
int i = 0, j = 0;
double x = 0.0;
//..
if ( 0 == i )
{
x = 1.0;
}
else if ( 1 == i )
{
x = 2.0;
} //违背1
if ( 0 == j )
{
x = x + 5.0;
}
return ( 0 );
}
int main ( void )
{
int i = 0, j = 0;
double x = 0.0;
//..
if ( 0 == i )
{
x = 1.0;
}
else if ( 1 == i )
{
x = 2.0;
}
else //遵循1
{
x = 0.0;
}
if ( 0 == j )
{
x = x + 5.0;
}
return ( 0 );
}
int main ( void )
{
int i = 0, j = 0;
double x = 0.0;
//..
if ( 0 == i )
{
x = 1.0;
}
else if ( 1 == i )
{
x = 2.0;
}
else //遵循1
{
x = 0.0;
}
if ( 0 == j )
{
x = x + 5.0;
}
return ( 0 );
}
int main ( void )
{
int i = 0, j = 0, k = 0;
double x = 0.0;
//..
if ( 0 == i )
{
x = 1.0;
}
else if ( 1 == i )
{
x = x - 1.0;
}
else
; //违背1
if ( 0 == j )
{
x = x + 1.0;
}
else if
( 1 == j )
{
; //违背2
}
else //违背3
{
}
if ( 0 == k )
{
x = x / 2.0;
}
else if ( 1 == k )
{
x = x / 3.0;
}
else
{
/* no deal with */ //违背4
}
return ( 0 );
}
int main ( void )
{
int i = 0, j = 0, k = 0;
double x = 0.0;
//..
if ( 0 == i )
{
x = 1.0;
}
else if ( 1 == i )
{
x = x - 1.0;
}
else
; //违背1
if ( 0 == j )
{
x = x + 1.0;
}
else if
( 1 == j )
{
; //违背2
}
else //违背3
{
}
if ( 0 == k )
{
x = x / 2.0;
}
else if ( 1 == k )
{
x = x / 3.0;
}
else
{
/* no deal with */ //违背4
}
return ( 0 );
}
int main ( void )
{
int i = 0, j = 0, k = 0;
double x = 0.0;
//..
if ( 0 == i )
{
x = 1.0;
}
else if ( 1 == i )
{
x = x - 1.0;
}
else
{
; /* no deal with */ //遵循1
}
if ( 0 == j )
{
x = x + 1.0;
}
else if ( 1 == j )
{
; /* no deal with */ //遵循2
}
else
{
; /* no deal with */ //遵循3
}
if ( 0 == k )
{
x = x / 2.0;
}
else if ( 1 == k )
{
x = x / 3.0;
}
else
{
; /* no deal with */ //遵循4
}
return ( 0 );
}
int main ( void )
{
int i = 0, j = 0, k = 0;
double x = 0.0;
//..
if ( 0 == i )
{
x = 1.0;
}
else if ( 1 == i )
{
x = x - 1.0;
}
else
{
; /* no deal with */ //遵循1
}
if ( 0 == j )
{
x = x + 1.0;
}
else if ( 1 == j )
{
; /* no deal with */ //遵循2
}
else
{
; /* no deal with */ //遵循3
}
if ( 0 == k )
{
x = x / 2.0;
}
else if ( 1 == k )
{
x = x / 3.0;
}
else
{
; /* no deal with */ //遵循4
}
return ( 0 );
}
int main ( void )
{
int i = 0;
switch ( i )
{
} //违背1
return ( 0 );
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment