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:
Rusty Russell 2024-04-04 14:06:11 +10:30
parent b22095b275
commit e3c4bdf209

View file

@ -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;