mirror of
https://github.com/ElementsProject/lightning.git
synced 2024-11-19 01:43:36 +01:00
lightningd: fix clang 19 compile error.
``` Ubuntu clang version 19.1.0 (++20240901083933+6d7e428df611-1~exp1~20240901084058.28) Target: x86_64-pc-linux-gnu Thread model: posix InstalledDir: /usr/lib/llvm-19/bin ./configure CC=clang-19 make -j17 <snip> cc lightningd/offer.c cc lightningd/signmessage.c lightningd/subd.c:945:16: error: variable length array folded to constant array as an extension [-Werror,-Wgnu-folding-constant] 945 | char permfail[strlen("PERMFAIL")]; | ^~~~~~~~~~~~~~~~~~ cc wallet/db.c ``` Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Changelog-Fixed: build: fix overzealous warning from clang 19.
This commit is contained in:
parent
2dd0d4c88a
commit
80357911fb
@ -944,7 +944,7 @@ char *opt_subd_dev_disconnect(const char *optarg, struct lightningd *ld)
|
||||
/* If test specified that this disconnection should cause permanent failure */
|
||||
bool dev_disconnect_permanent(struct lightningd *ld)
|
||||
{
|
||||
char permfail[strlen("PERMFAIL")];
|
||||
char permfail[sizeof("PERMFAIL") - 1];
|
||||
int r;
|
||||
|
||||
if (ld->dev_disconnect_fd == -1)
|
||||
|
Loading…
Reference in New Issue
Block a user