mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-03-15 11:59:16 +01:00
common/test: fix gcc-12.3.0 -O3 warning.
``` common/test/run-bolt12_decode.c:206:17: error: ‘valid’ may be used uninitialized [-Werror=maybe-uninitialized] 206 | printf("%s %s\n", str, valid ? "OK": "INVALID"); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ common/test/run-bolt12_decode.c:191:22: note: ‘valid’ was declared here 191 | bool valid, actual; | ^~~~~ ``` Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
parent
c889976d03
commit
be082cdff4
1 changed files with 1 additions and 1 deletions
|
@ -195,7 +195,7 @@ int main(int argc, char *argv[])
|
|||
size_t dlen;
|
||||
struct json_escape *esc;
|
||||
|
||||
json_to_bool(json, json_get_member(json, t, "valid"), &valid);
|
||||
assert(json_to_bool(json, json_get_member(json, t, "valid"), &valid));
|
||||
strtok = json_get_member(json, t, "string");
|
||||
esc = json_escape_string_(tmpctx, json + strtok->start,
|
||||
strtok->end - strtok->start);
|
||||
|
|
Loading…
Add table
Reference in a new issue