mirror of
https://github.com/ElementsProject/lightning.git
synced 2026-08-19 13:17:42 +02:00
renepay: fix gcc -O3 overzealous warning.
gcc-12 (Ubuntu 12.3.0-9ubuntu2) 12.3.0 with -O3 gives:
```
In file included from plugins/renepay/test/../mcf.c:5,
from plugins/renepay/test/run-arc.c:13:
ccan/ccan/tal/str/str.h: In function ‘minflow’:
ccan/ccan/tal/str/str.h:43:9: error: ‘errmsg’ may be used uninitialized [-Werror=maybe-uninitialized]
43 | tal_fmt_(ctx, TAL_LABEL(char, "[]"), __VA_ARGS__)
| ^~~~~~~~
plugins/renepay/test/../mcf.c:1565:15: note: ‘errmsg’ was declared here
1565 | char *errmsg;
| ^~~~~~
cc1: all warnings being treated as errors
```
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
parent
b22095b275
commit
e3c4bdf209
1 changed files with 2 additions and 0 deletions
|
|
@ -1451,6 +1451,8 @@ get_flow_paths(const tal_t *ctx, const struct gossmap *gossmap,
|
|||
flows[i] = tal_steal(flows,flows[i]);
|
||||
assert(flows[i]);
|
||||
}
|
||||
if (fail)
|
||||
*fail = NULL;
|
||||
tal_free(this_ctx);
|
||||
return flows;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue