From b7c94538066fbdfe85c45316102e06278bb61e6e Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Wed, 24 Feb 2010 14:09:06 +1030 Subject: [PATCH] tools: fix warnings from Ubuntu strict compiler. --- tools/ccanlint/compulsory_tests/run_tests.c | 6 +++++- tools/ccanlint/tests/run_tests_valgrind.c | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/tools/ccanlint/compulsory_tests/run_tests.c b/tools/ccanlint/compulsory_tests/run_tests.c index 763b54a3..16a07aee 100644 --- a/tools/ccanlint/compulsory_tests/run_tests.c +++ b/tools/ccanlint/compulsory_tests/run_tests.c @@ -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 = { diff --git a/tools/ccanlint/tests/run_tests_valgrind.c b/tools/ccanlint/tests/run_tests_valgrind.c index 47d93c57..2191f80e 100644 --- a/tools/ccanlint/tests/run_tests_valgrind.c +++ b/tools/ccanlint/tests/run_tests_valgrind.c @@ -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 = { -- 2.39.2