Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
devel/libcbor: fix strict prototype warnings with clang 15
During an exp-run for llvm 15 (see bug 265425), it turned out that security/libfido2 failed to build with clang 15: In file included from /wrkdirs/usr/ports/security/libfido2/work/libfido2-1.12.0/src/aes256.c:8: In file included from /wrkdirs/usr/ports/security/libfido2/work/libfido2-1.12.0/src/fido.h:42: In file included from /usr/local/include/cbor.h:14: /usr/local/include/cbor/arrays.h:100:51: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes] CBOR_EXPORT cbor_item_t* cbor_new_indefinite_array(); ^ void In file included from /wrkdirs/usr/ports/security/libfido2/work/libfido2-1.12.0/src/aes256.c:8: In file included from /wrkdirs/usr/ports/security/libfido2/work/libfido2-1.12.0/src/fido.h:42: In file included from /usr/local/include/cbor.h:15: /usr/local/include/cbor/bytestrings.h:107:54: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes] CBOR_EXPORT cbor_item_t *cbor_new_definite_bytestring(); ^ void And many more of these -Werror warnings, all due to declarations in libcbor's headers. These are triggered because functions taking no parameters should be declared with "(void)", not "()". I would like to propose to fix the problem on the libcbor side, by editing the declarations and definitions of such functions in the port Makefile. This cleans up all warnings in devel/libcbor, and also fixes security/libfido2 as a consequence. PR: 268417 Approved by: maintainer timeout (2 weeks) MFH: 2022Q4
- Loading branch information