mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-02-06 17:30:36 +01:00
test: Silence gcc warning
cairo-test-runner.c:180: warning: unused variable ‘buf’
This commit is contained in:
parent
2b84d82bcf
commit
d6efb2a0b7
1 changed files with 4 additions and 4 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue