diff options
author | Andrea Canciani <ranma42@gmail.com> | 2011-03-17 09:24:55 +0100 |
---|---|---|
committer | Andrea Canciani <ranma42@gmail.com> | 2011-03-17 17:04:42 +0100 |
commit | d6efb2a0b78ec8c3cc520e7a1ddebc8a5c5dc706 (patch) | |
tree | 553b8c53a9d4f59bfaa6b47834241fb105d5128c /test | |
parent | 2b84d82bcfb6c89ececfdfe4f4e10bb631050131 (diff) |
test: Silence gcc warning
cairo-test-runner.c:180: warning: unused variable ‘buf’
Diffstat (limited to 'test')
-rw-r--r-- | test/cairo-test-runner.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/test/cairo-test-runner.c b/test/cairo-test-runner.c index aebec763..c5d09456 100644 --- a/test/cairo-test-runner.c +++ b/test/cairo-test-runner.c @@ -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; } |