mirror of
https://github.com/Zenithsiz/ftmemsim-valgrind.git
synced 2026-02-04 02:18:37 +00:00
swapping the roles of the VALGRIND_DO_CLIENT_REQUEST() and VALGRIND_DO_CLIENT_REQUEST_EXPR() macros. Also, many __attribute__((unused)) declarations on variables have been eliminated. Closes #269778. Note: so far this patch has been tested on x86/Linux, amd64/Linux and ppc64/Linux but not yet on any other supported CPU/OS combination. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11755
31 lines
454 B
C
31 lines
454 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() );
|
|
(void)VALGRIND_DISCARD_TRANSLATIONS( (char*)(&fooble),
|
|
((char*)(&someother)) - ((char*)(&fooble)) );
|
|
printf("fooble-2() = %d\n", fooble() );
|
|
return 0;
|
|
}
|
|
|