]> git.ozlabs.org Git - ccan/blobdiff - tools/ccanlint/tests/examples_relevant.c
tools: fix up warnings with -Wwrite-strings.
[ccan] / tools / ccanlint / tests / examples_relevant.c
index 283e78c10cda3914ce3ccaaad328c31be94d5f89..66dee27e65c427cc91bd4f67a5a7e1b04fe7f292 100644 (file)
@@ -30,6 +30,11 @@ static void examples_relevant_check(struct manifest *m,
                        if (!streq(d->type, "example"))
                                continue;
 
+                       if (!d->function) {
+                               score_file_error(score, f, d->srcline+1,
+                                                "Function name not found in summary line");
+                               continue;
+                       }
                        for (i = 0; i < d->num_lines; i++) {
                                if (strstr(d->lines[i], d->function))
                                        found = true;