From 8448fd2813c4a8bdeff08c739129c877204341a7 Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Mon, 4 Jul 2022 09:41:57 +0930 Subject: [PATCH 1/1] ccan/rune: compile without warnings on -O3. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit ``` ccan/ccan/rune/rune.c: In function ‘rune_alt_single_int’: ccan/ccan/rune/rune.c:257:5: error: ‘runeval_int’ may be used uninitialized in this function [-Werror=maybe-uninitialized] 257 | if (cond) | ^ ccan/ccan/rune/rune.c:305:6: note: ‘runeval_int’ was declared here 305 | s64 runeval_int; | ^~~~~~~~~~~ cc1: all warnings being treated as errors make: *** [Makefile:919: ccan-rune-rune.o] Error 1 ``` Signed-off-by: Rusty Russell --- ccan/rune/rune.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ccan/rune/rune.c b/ccan/rune/rune.c index 0ff7968b..84296c66 100644 --- a/ccan/rune/rune.c +++ b/ccan/rune/rune.c @@ -302,7 +302,7 @@ static const char *rune_alt_single(const tal_t *ctx, const s64 *fieldval_int) { char strfield[STR_MAX_CHARS(s64) + 1]; - s64 runeval_int; + s64 runeval_int = 0 /* gcc v9.4.0 gets upset with uninitiaized var at -O3 */; const char *err; /* Caller can't set both! */ -- 2.39.2