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

main

parents
int main ( void )
{
unsigned int i, j, z[ 100 ];
volatile unsigned int v = 1;
for ( i = 0; i < 100; i++ )
{
j = v; //遵循1
z[ i ] = 3 * j * j + 2 * j + i;
}
return ( 0 );
}
#include <stdlib.h>
int fun ( int width );
int main ( void )
{
int i;
i = fun ( NULL ); //违背1
return ( 0 );
}
int fun ( int width )
{
int w;
w = width - 10;
return w;
}
#include <stdlib.h>
int fun ( int width );
int main ( void )
{
int i;
i = fun ( NULL ); //违背1
return ( 0 );
}
int fun ( int width )
{
int w;
w = width - 10;
return w;
}
#include <stdlib.h>
int fun ( int width );
int main ( void )
{
int i;
i = fun ( 0 ); //遵循1
return ( 0 );
}
int fun ( int width )
{
int w;
w = width - 10;
return w;
}
#include <stdlib.h>
int fun ( int width );
int main ( void )
{
int i;
i = fun ( 0 ); //遵循1
return ( 0 );
}
int fun ( int width )
{
int w;
w = width - 10;
return w;
}
int main ( void )
{
unsigned short usX;
usX = -10; //违背1
//...
return ( 0 );
}
int main ( void )
{
unsigned short usX;
usX = -10; //违背1
//...
return ( 0 );
}
int main ( void )
{
unsigned short usX;
usX = ( unsigned short ) ( -10 ); //遵循1
//...
return ( 0 );
}
int main ( void )
{
unsigned short usX;
usX = ( unsigned short ) ( -10 ); //遵循1
//...
return ( 0 );
}
#include <stdio.h>
int main ( void )
{
char buf[ 8 ];
buf[ 0 ] = 'y';
buf[ 1 ] = 'e';
buf[ 2 ] = 's'; //违背1
printf ( "%s\n", buf );
return ( 0 );
}
#include <stdio.h>
int main ( void )
{
char buf[ 8 ];
buf[ 0 ] = 'y';
buf[ 1 ] = 'e';
buf[ 2 ] = 's'; //违背1
printf ( "%s\n", buf );
return ( 0 );
}
#include <stdio.h>
int main ( void )
{
char buf[ 8 ];
buf[ 0 ] = 'y';
buf[ 1 ] = 'e';
buf[ 2 ] = 's';
buf[ 3 ] = '\0'; //遵循1
printf ( "%s\n", buf );
return ( 0 );
}
#include <stdio.h>
int main ( void )
{
char buf[ 8 ];
buf[ 0 ] = 'y';
buf[ 1 ] = 'e';
buf[ 2 ] = 's';
buf[ 3 ] = '\0'; //遵循1
printf ( "%s\n", buf );
return ( 0 );
}
int sign = 0;
int func ( int sign ) //违背1
{
int local = 0;
local = sign;
//...
return local;
}
int main ( void )
{
//...
return ( 0 );
}
int sign = 0;
int func ( int sign ) //违背1
{
int local = 0;
local = sign;
//...
return local;
}
int main ( void )
{
//...
return ( 0 );
}
void misdis ( void )
{
//...
}
int main ( void )
{
int misdis; //违背1
misdis = 0;
return ( 0 );
}
void misdis ( void )
{
//...
}
int main ( void )
{
int misdis; //违背1
misdis = 0;
return ( 0 );
}
struct POINTA
{
unsigned int x;
unsigned int y;
};
struct POINTB
{
unsigned int y;
unsigned int z;
};
int main ( void )
{
unsigned int POINTA; //违背1
struct POINTB POINTB; //违背2
POINTA = 1;
POINTB.y = POINTA;
return ( 0 );
}
struct POINTA
{
unsigned int x;
unsigned int y;
};
struct POINTB
{
unsigned int y;
unsigned int z;
};
int main ( void )
{
unsigned int POINTA; //违背1
struct POINTB POINTB; //违背2
POINTA = 1;
POINTB.y = POINTA;
return ( 0 );
}
struct POINTA
{
unsigned int x;
unsigned int y;
};
struct POINTB
{
unsigned int y;
unsigned int z;
};
int main ( void )
{
unsigned int pot_y; //遵循1
struct POINTB spotb; //遵循2
pot_y = 1;
spotb.y = pot_y;
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