• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 
2 #include <stdio.h>
3 #include "../../include/valgrind.h"
4 
5 
6 
7 
fooble(void)8 int fooble ( void )
9 {
10   int x, y;
11   y = 0;
12   for (x = 0; x < 100; x++) {
13     if ((x % 3) == 0) y += x; else y++;
14   }
15   return y;
16 }
17 
someother(void)18 void someother ( void )
19 {
20 }
21 
main(void)22 int main ( void )
23 {
24   printf("fooble-1() = %d\n", fooble() );
25   VALGRIND_DISCARD_TRANSLATIONS( (char*)(&fooble),
26           ((char*)(&someother)) - ((char*)(&fooble)) );
27   printf("fooble-2() = %d\n", fooble() );
28   return 0;
29 }
30 
31