ccanlint: remove empty statement warnings.
authorRusty Russell <rusty@rustcorp.com.au>
Sun, 6 Nov 2016 06:43:53 +0000 (17:13 +1030)
committerRusty Russell <rusty@rustcorp.com.au>
Sun, 6 Nov 2016 06:43:53 +0000 (17:13 +1030)
Since doesnt_matter() expands to nothing, GCC -Wextra suggests { }.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
tools/ccanlint/tests/tests_pass.c
tools/ccanlint/tests/tests_pass_valgrind.c
tools/ccanlint/tests/tests_pass_without_features.c

index af71dbe4c9f58cce4cc5da90a8e58da2c84b129b..ba6103de2d50bf118b1952df3e7c28f66f16e7a2 100644 (file)
@@ -139,8 +139,9 @@ static void run_under_debugger(struct manifest *m, struct score *score)
 
        command = tal_fmt(m, "gdb -ex 'break tap.c:139' -ex 'run' %s",
                          first->file->compiled[COMPILE_NORMAL]);
 
        command = tal_fmt(m, "gdb -ex 'break tap.c:139' -ex 'run' %s",
                          first->file->compiled[COMPILE_NORMAL]);
-       if (system(command))
+       if (system(command)) {
                doesnt_matter();
                doesnt_matter();
+       }
 }
 
 struct ccanlint tests_pass = {
 }
 
 struct ccanlint tests_pass = {
index 700efeb94110cce2cbc6d636ebd9b4f8f790c972..90e42349715f9ff2c0ef706e54123072f5f52212 100644 (file)
@@ -255,8 +255,9 @@ static void run_under_debugger_vg(struct manifest *m, struct score *score)
                          concat(score, per_file_options(&tests_pass_valgrind,
                                                         first->file)),
                          valgrind_suppress, first->file->compiled[COMPILE_NORMAL]);
                          concat(score, per_file_options(&tests_pass_valgrind,
                                                         first->file)),
                          valgrind_suppress, first->file->compiled[COMPILE_NORMAL]);
-       if (system(command))
+       if (system(command)) {
                doesnt_matter();
                doesnt_matter();
+       }
 }
 
 struct ccanlint tests_pass_valgrind = {
 }
 
 struct ccanlint tests_pass_valgrind = {
index 999c4eda45663dace4fa759dc891e7a5f8ee3c94..15b161ef9c20a06f9e2bbfe22749cddd14ece7ed 100644 (file)
@@ -56,8 +56,9 @@ static void run_under_debugger(struct manifest *m, struct score *score)
 
        command = tal_fmt(m, "gdb -ex 'break tap.c:139' -ex 'run' %s",
                          first->file->compiled[COMPILE_NOFEAT]);
 
        command = tal_fmt(m, "gdb -ex 'break tap.c:139' -ex 'run' %s",
                          first->file->compiled[COMPILE_NOFEAT]);
-       if (system(command))
+       if (system(command)) {
                doesnt_matter();
                doesnt_matter();
+       }
 }
 
 struct ccanlint tests_pass_without_features = {
 }
 
 struct ccanlint tests_pass_without_features = {