mirror of
https://github.com/Zenithsiz/ftmemsim-valgrind.git
synced 2026-02-05 19:13:46 +00:00
memcheck.h) by changing a bunch of VALGRIND_DO_CLIENT_REQUEST_EXPR into VALGRIND_DO_CLIENT_REQUEST_STMT for cases where the return value of the former would be unused. (Bart Van Assche, bart.vanassche@gmail.com) git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12226
31 lines
448 B
C
31 lines
448 B
C
|
|
#include <stdio.h>
|
|
#include "../../include/valgrind.h"
|
|
|
|
|
|
|
|
|
|
int fooble ( void )
|
|
{
|
|
int x, y;
|
|
y = 0;
|
|
for (x = 0; x < 100; x++) {
|
|
if ((x % 3) == 0) y += x; else y++;
|
|
}
|
|
return y;
|
|
}
|
|
|
|
void someother ( void )
|
|
{
|
|
}
|
|
|
|
int main ( void )
|
|
{
|
|
printf("fooble-1() = %d\n", fooble() );
|
|
VALGRIND_DISCARD_TRANSLATIONS( (char*)(&fooble),
|
|
((char*)(&someother)) - ((char*)(&fooble)) );
|
|
printf("fooble-2() = %d\n", fooble() );
|
|
return 0;
|
|
}
|
|
|