ccanlint: fix more potential segvs when reporting ccanlint errors.
[ccan] / tools / ccanlint / tests / no_trailing_whitespace.c
index 1018be3cd64938788a47019f71b11c832755fa8b..3f41877a31a42a4302fb1c8eb8ff44143450da67 100644 (file)
@@ -36,7 +36,8 @@ static void check_trailing_whitespace(struct manifest *m,
                        for (i = 0; i < f->num_lines; i++) {
                                char *err = get_trailing_whitespace(lines[i]);
                                if (err)
-                                       score_file_error(score, f, i+1, err);
+                                       score_file_error(score, f, i+1,
+                                                        "%s", err);
                        }
                }
        }