[cairo-commit] test/cairo-test-runner.c

Andrea Canciani ranma42 at kemper.freedesktop.org
Thu Mar 17 09:05:15 PDT 2011


 test/cairo-test-runner.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

New commits:
commit d6efb2a0b78ec8c3cc520e7a1ddebc8a5c5dc706
Author: Andrea Canciani <ranma42 at gmail.com>
Date:   Thu Mar 17 09:24:55 2011 +0100

    test: Silence gcc warning
    
    cairo-test-runner.c:180: warning: unused variable ‘buf’

diff --git a/test/cairo-test-runner.c b/test/cairo-test-runner.c
index aebec76..c5d0945 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;
 }
 


More information about the cairo-commit mailing list