Commit 89fcdf8c authored by Rusty Russell's avatar Rusty Russell

ccanlint: check unused result.

GCC with -O gives an error here.
Signed-off-by: default avatarRusty Russell <rusty@rustcorp.com.au>
parent 1ddb7420
...@@ -45,7 +45,10 @@ static char *add_example(struct manifest *m, struct ccan_file *source, ...@@ -45,7 +45,10 @@ static char *add_example(struct manifest *m, struct ccan_file *source,
/* Add #line to demark where we are from, so errors are correct! */ /* Add #line to demark where we are from, so errors are correct! */
linemarker = tal_fmt(f, "#line %i \"%s\"\n", linemarker = tal_fmt(f, "#line %i \"%s\"\n",
example->srcline+2, source->fullname); example->srcline+2, source->fullname);
write(fd, linemarker, strlen(linemarker)); if (write(fd, linemarker, strlen(linemarker)) != (int)strlen(linemarker)) {
close(fd);
return cast_const(char *, "Failure writing to temporary file");
}
for (i = 0; i < example->num_lines; i++) { for (i = 0; i < example->num_lines; i++) {
if (write(fd, example->lines[i], strlen(example->lines[i])) if (write(fd, example->lines[i], strlen(example->lines[i]))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment