Bart Van Assche 9a36fe677e Get rid of the remaining "set but not used" warnings reported by gcc 4.6 by
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
2011-05-15 07:04:03 +00:00

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;
}