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:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user