Tweak manuel2 so that the Memcheck-detected error is more reliable, and that

we never accidentally also get an undefined-condition-error.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3371
This commit is contained in:
Nicholas Nethercote 2005-03-16 03:07:33 +00:00
parent 3c1778a582
commit 05cbc6b2e1
2 changed files with 4 additions and 2 deletions

View File

@ -3,7 +3,9 @@
int main ()
{
int *x;
int y = 0;
int *m = malloc(sizeof(int));
int *x = m[0] + &y; // we know m[0] will be zero
printf ("x = %d\n", *x==0xDEADBEEF ? 99 : 88);

View File

@ -1,2 +1,2 @@
Use of uninitialised value of size 4
at 0x........: main (manuel2.c:8)
at 0x........: main (manuel2.c:10)