test: Silence gcc warning

cairo-test-runner.c:180: warning: unused variable ‘buf’
This commit is contained in:
Andrea Canciani 2011-03-17 09:24:55 +01:00
parent 2b84d82bcf
commit d6efb2a0b7

View file

@ -177,12 +177,9 @@ _list_free (cairo_test_list_t *list)
static cairo_bool_t
is_running_under_debugger (void)
{
#if HAVE_UNISTD_H && HAVE_LIBGEN_H && __linux__
char buf[1024];
if (RUNNING_ON_VALGRIND)
return TRUE;
#if HAVE_UNISTD_H && HAVE_LIBGEN_H && __linux__
sprintf (buf, "/proc/%d/exe", getppid ());
if (readlink (buf, buf, sizeof (buf)) != -1 &&
strncmp (basename (buf), "gdb", 3) == 0)
@ -191,6 +188,9 @@ is_running_under_debugger (void)
}
#endif
if (RUNNING_ON_VALGRIND)
return TRUE;
return FALSE;
}