Tom Hughes eab4171285 Fix compiler warnings by using a variable to hide the null pointer
from the compiler.

Patch from Bart Van Assche <bart.vanassche@gmail.com>.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7317
2008-01-05 00:01:20 +00:00

14 lines
236 B
C

#include <unistd.h>
int main(void)
{
char* null_filename = NULL;
char* bad[2] = { (char*)1, NULL };
char* good[1] = { NULL };
execve(null_filename, bad, bad);
execve("/bin/true", good, good);
return 0;
}