tools: fix warnings from Ubuntu strict compiler.
authorRusty Russell <rusty@rustcorp.com.au>
Wed, 24 Feb 2010 03:39:06 +0000 (14:09 +1030)
committerRusty Russell <rusty@rustcorp.com.au>
Wed, 24 Feb 2010 03:39:06 +0000 (14:09 +1030)
tools/ccanlint/compulsory_tests/run_tests.c
tools/ccanlint/tests/run_tests_valgrind.c

index 763b54a3e66924e38a8611680992cccec6101c58..16a07aee1cca555647bd2e0731ecee11f31c5eb2 100644 (file)
@@ -104,6 +104,9 @@ static const char *describe_run_tests(struct manifest *m,
        return descrip;
 }
 
+/* Gcc's warn_unused_result is fascist bullshit. */
+#define doesnt_matter()
+
 static void run_under_debugger(struct manifest *m, void *check_result)
 {
        char *command;
@@ -116,7 +119,8 @@ static void run_under_debugger(struct manifest *m, void *check_result)
        first = list_top(list, struct run_tests_result, list);
        command = talloc_asprintf(m, "gdb -ex 'break tap.c:136' -ex 'run' %s",
                                  first->file->compiled);
-       system(command);
+       if (system(command))
+               doesnt_matter();
 }
 
 struct ccanlint run_tests = {
index 47d93c578efd4c69e5d6f3a667271af6c39df813..2191f80e3dcfc2ecd2d118fe4c3df6ab26a9b85a 100644 (file)
@@ -107,6 +107,9 @@ static const char *describe_run_tests_vg(struct manifest *m,
        return descrip;
 }
 
+/* Gcc's warn_unused_result is fascist bullshit. */
+#define doesnt_matter()
+
 static void run_under_debugger_vg(struct manifest *m, void *check_result)
 {
        struct list_head *list = check_result;
@@ -119,7 +122,8 @@ static void run_under_debugger_vg(struct manifest *m, void *check_result)
        first = list_top(list, struct run_tests_result, list);
        command = talloc_asprintf(m, "valgrind --db-attach=yes %s",
                                  first->file->compiled);
-       system(command);
+       if (system(command))
+               doesnt_matter();
 }
 
 struct ccanlint run_tests_vg = {