Skip to content

Fix erroneous semi colon in FFI_EXTRA_CIF_FIELDS on some platforms#968

Merged
atgreen merged 1 commit into
libffi:masterfrom
sxa:riscv_erroneous_semi
Jun 5, 2026
Merged

Fix erroneous semi colon in FFI_EXTRA_CIF_FIELDS on some platforms#968
atgreen merged 1 commit into
libffi:masterfrom
sxa:riscv_erroneous_semi

Conversation

@sxa

@sxa sxa commented Jun 2, 2026

Copy link
Copy Markdown
Contributor

Seen on riscv64 when building with clang using the -Werror-semi -Werror parameters as per nodejs/unofficial-builds#235

The FFI_EXTRA_CIF_FIELDS definition on some platforms has an extra trailing semicolon meaning that when it is referenced in

FFI_EXTRA_CIF_FIELDS;
(which also has a trailing semi) it triggers the compiler error due to having two consecutive semi-colons.

I've only tested with this on riscv but since I saw what seems to be the same on two other platforms I've also corrected it there.

The failure is reproducible with any source file that includes ffi.h on RISC-V: clang-20 -c hello.cc -Werror-semi -Werror

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants