Skip to content

Commit 9295b4f

Browse files
committed
common/test: fix -O3 compile error with gcc-12 (Ubuntu 12.3.0-17ubuntu1) 12.3.0
``` common/test/run-splice_script.c: In function ‘main’: common/test/run-splice_script.c:349:17: error: ‘%.*s’ directive argument is null [-Werror=format-overflow=] 349 | printf("%.*s\n", (int)len, str); | ^~~~ cc1: all warnings being treated as errors make: *** [Makefile:297: common/test/run-splice_script.o] Error 1 make: *** Waiting for unfinished jobs.... ``` Signed-off-by: Rusty Russell <[email protected]>
1 parent 8566370 commit 9295b4f

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

common/test/run-splice_script.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -345,10 +345,8 @@ int main(int argc, char *argv[])
345345
splice_to_json(tmpctx, result, js);
346346

347347
str = json_out_contents(js->jout, &len);
348-
349-
printf("%.*s\n", (int)len, str);
350-
351348
assert(str);
349+
printf("%.*s\n", (int)len, str);
352350

353351
toks = json_parse_simple(tmpctx, str, len);
354352

0 commit comments

Comments
 (0)