core-lightning/plugins
Vincenzo Palazzo ca2a162d70 fix: build with gcc 13 with enum and int mismatch
gcc 13 add an extra check for the enum in the definition
of a method. In our case the code was failing with the
following error, and the compiler is right, our definition
is different from the implementation.

```
$ make
CC: cc -DBINTOPKGLIBEXECDIR="../libexec/c-lightning" -Wall -Wundef -Wmissing-prototypes -Wmissing-declarations -Wstrict-prototypes -Wold-style-definition -Werror -Wno-maybe-uninitialized -Wshadow=local -std=gnu11 -g -fstack-protector-strong -Og -I ccan -I external/libwally-core/include/ -I external/libwally-core/src/secp256k1/include/ -I external/jsmn/ -I external/libbacktrace/ -I external/gheap/ -I external/x86_64-redhat-linux/libbacktrace-build -I external/libsodium/src/libsodium/include -I external/libsodium/src/libsodium/include/sodium -I external/x86_64-redhat-linux/libsodium-build/src/libsodium/include -I . -I/usr/local/include      -DSHACHAIN_BITS=48 -DJSMN_PARENT_LINKS  -DCOMPAT_V052=1 -DCOMPAT_V060=1 -DCOMPAT_V061=1 -DCOMPAT_V062=1 -DCOMPAT_V070=1 -DCOMPAT_V072=1 -DCOMPAT_V073=1 -DCOMPAT_V080=1 -DCOMPAT_V081=1 -DCOMPAT_V082=1 -DCOMPAT_V090=1 -DCOMPAT_V0100=1 -DCOMPAT_V0121=1 -DBUILD_ELEMENTS=1  -c -o
LD: cc   -Og  config.vars  -Lexternal/x86_64-redhat-linux -lwallycore -lsecp256k1 -ljsmn -lbacktrace -lsodium -L/usr/local/include -lm -lgmp -lsqlite3  -lz  -o
cc plugins/spender/multifundchannel.c
plugins/spender/multifundchannel.c:71:6: error: conflicting types for ‘fail_destination_msg’ due to enum/integer mismatch; have ‘void(struct multifundchannel_destination *, enum jsonrpc_errcode,  const char *)’ [-Werror=enum-int-mismatch]
   71 | void fail_destination_msg(struct multifundchannel_destination *dest,
      |      ^~~~~~~~~~~~~~~~~~~~
In file included from plugins/spender/multifundchannel.c:13:
./plugins/spender/multifundchannel.h:263:6: note: previous declaration of ‘fail_destination_msg’ with type ‘void(struct multifundchannel_destination *, int,  const char *)’
  263 | void fail_destination_msg(struct multifundchannel_destination *dest,
      |      ^~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
make: *** [Makefile:307: plugins/spender/multifundchannel.o] Error 1
```

The gcc 13 is not released yet, but fedora beta is out for public testing,
so it is useful fix this error in this release candidate cycle.

Changelog-Fixed: Build: Compilation with upcoming gcc 13

Reported-by: @grubles
Link: https://github.com/ElementsProject/lightning/issues/6175
Signed-off-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com>
2023-04-27 07:41:27 +09:30
..
bkpr wallet: add channel_type field to db. 2023-04-10 17:26:47 +09:30
examples pytest: Highlight the re-entrancy issue for cln-plugin events 2023-04-13 18:13:28 -07:00
grpc-plugin grpc: make the mTLS private keys user-readable only 2023-03-24 00:23:43 +00:00
spender fix: build with gcc 13 with enum and int mismatch 2023-04-27 07:41:27 +09:30
src rs: Run hooks, methods and notification handlers in tokio tasks 2023-04-13 18:13:28 -07:00
test cleanup: rename json_add_amount_msat_only to json_add_amount_msat 2023-03-18 15:55:49 +10:30
.gitignore ignore sql binary plugin 2023-02-08 14:38:58 -06:00
autoclean.c plugin: autoclean: cleanup the forwards with localfailed 2023-03-23 08:18:27 +00:00
bcli.c plugins/bcli: use the new feerate levels, and the floor. 2023-04-10 07:31:12 +09:30
Cargo.toml rs: Add cln-plugin metadata 2023-01-02 14:33:02 +01:00
chanbackup.c chanbackup: even if they enable experimental-peer-storage, check peers 2023-03-08 18:46:21 -06:00
commando.c commando: add restrictions information in listrune command 2023-04-01 14:07:23 +10:30
fetchinvoice.c plugin: fetchinvoice: set the quantity in invreq 2023-03-20 20:25:02 +00:00
funder.c Update libwally to 0.8.8, support PSBTv2 2023-03-23 16:10:55 +10:30
funder_policy.c df: pass lease data back to funder for rbfs 2022-10-20 13:42:41 +02:00
funder_policy.h df: pass lease data back to funder for rbfs 2022-10-20 13:42:41 +02:00
keysend.c Makefile: update bolts to 60cfb5972ad4bec4c49ee0f9e729fb3352fcdc6a. 2023-04-07 21:22:56 +09:30
libplugin-pay.c Makefile: update bolts to 60cfb5972ad4bec4c49ee0f9e729fb3352fcdc6a. 2023-04-07 21:22:56 +09:30
libplugin-pay.h Makefile: update bolts to 60cfb5972ad4bec4c49ee0f9e729fb3352fcdc6a. 2023-04-07 21:22:56 +09:30
libplugin.c libplugin: Expose the jsonrpc_request_sync method 2023-02-28 15:00:44 -06:00
libplugin.h libplugin: Expose the jsonrpc_request_sync method 2023-02-28 15:00:44 -06:00
Makefile pytest: Highlight the re-entrancy issue for cln-plugin events 2023-04-13 18:13:28 -07:00
offers.c cleanup: rename json_add_amount_msat_only to json_add_amount_msat 2023-03-18 15:55:49 +10:30
offers.h common: update to latest onion message spec. 2022-10-26 11:29:06 +10:30
offers_inv_hook.c lightningd: re-add 'offerout' functionality, as 'invoicerequest'. 2022-11-09 15:08:03 +01:00
offers_inv_hook.h lightningd: re-add 'offerout' functionality, as 'invoicerequest'. 2022-11-09 15:08:03 +01:00
offers_invreq_hook.c offers: fix pay where we are using deprecated apis. 2023-02-03 16:59:51 +01:00
offers_invreq_hook.h offers: create a real blinded path, if necessary. 2022-11-09 15:08:03 +01:00
offers_offer.c offers: enable label for invoicerequest 2023-03-09 06:56:06 -06:00
offers_offer.h lightningd: re-add 'offerout' functionality, as 'invoicerequest'. 2022-11-09 15:08:03 +01:00
pay.c cleanup: rename json_add_amount_msat_only to json_add_amount_msat 2023-03-18 15:55:49 +10:30
README.md doc: fix wording in plugins/README.md 2020-01-06 12:57:59 +01:00
sql.c plugins/sql: recurse correctly into complex objects during processing. 2023-03-25 15:28:02 +10:30
topology.c cleanup: rename json_add_amount_msat_only to json_add_amount_msat 2023-03-18 15:55:49 +10:30
txprepare.c Update libwally to 0.8.8, support PSBTv2 2023-03-23 16:10:55 +10:30

Plugin Directory

Any file in this directory which is executable and whose name only consists of alphanumeric characters, space, '.', '-' or '_' will be automatically loaded when lightningd starts (unless suppressed with commandline options).