]> git.ozlabs.org Git - ccan/blobdiff - tools/ccanlint/tests/tests_helpers_compile.c
tools: fix up warnings with -Wwrite-strings.
[ccan] / tools / ccanlint / tests / tests_helpers_compile.c
index 0ad5a7e67cc7847fb9bbc9c568ef403b7752eb7d..7aad1dcb9291b48a96bce6688af2291dcc016fa9 100644 (file)
@@ -27,7 +27,7 @@ static bool compile(struct manifest *m,
                    char **output)
 {
        cfile->compiled = maybe_temp_file(m, ".o", keep, cfile->fullname);
-       return compile_object(m, cfile->fullname, ccan_dir, "",
+       return compile_object(m, cfile->fullname, ccan_dir, compiler, cflags,
                              cfile->compiled, output);
 }
 
@@ -49,12 +49,12 @@ static void do_compile_test_helpers(struct manifest *m,
 
                if (!compile(m, keep, i, &cmdout)) {
                        errors = true;
-                       score->error = "Failed to compile helper C files";
-                       score_file_error(score, i, 0, cmdout);
+                       score_file_error(score, i, 0, "Compile failed:\n%s",
+                                        cmdout);
                } else if (!streq(cmdout, "")) {
                        warnings = true;
-                       score->error = "Helper C files gave warnings";
-                       score_file_error(score, i, 0, cmdout);
+                       score_file_error(score, i, 0,
+                                        "Compile gave warnings:\n%s", cmdout);
                }
        }