git: 2d70306aabb4 - stable/12 - Adjust function definitions in netipsec's key.c to avoid clang 15 warnings
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 29 Jul 2022 18:48:49 UTC
The branch stable/12 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=2d70306aabb4bf4c3a3cf746aba49963ea94bf56 commit 2d70306aabb4bf4c3a3cf746aba49963ea94bf56 Author: Dimitry Andric <dim@FreeBSD.org> AuthorDate: 2022-07-26 19:15:37 +0000 Commit: Dimitry Andric <dim@FreeBSD.org> CommitDate: 2022-07-29 18:45:14 +0000 Adjust function definitions in netipsec's key.c to avoid clang 15 warnings With clang 15, the following -Werror warnings are produced: sys/netipsec/key.c:6432:15: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes] key_getcomb_ah() ^ void sys/netipsec/key.c:6489:19: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes] key_getcomb_ipcomp() ^ void This is because key_getcomb_ah() and key_getcomb_ipcomp() are declared with (void) argument lists, but defined with empty argument lists. Make the definitions match the declarations. MFC after: 3 days (cherry picked from commit 8bd2887be5105010e73fc35ddd25021e186811b8) --- sys/netipsec/key.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/netipsec/key.c b/sys/netipsec/key.c index 347aa821e358..4441cbacd9e5 100644 --- a/sys/netipsec/key.c +++ b/sys/netipsec/key.c @@ -6397,7 +6397,7 @@ key_getsizes_ah(const struct auth_hash *ah, int alg, u_int16_t* min, * XXX reorder combinations by preference */ static struct mbuf * -key_getcomb_ah() +key_getcomb_ah(void) { const struct auth_hash *algo; struct sadb_comb *comb; @@ -6455,7 +6455,7 @@ key_getcomb_ah() * XXX reorder combinations by preference */ static struct mbuf * -key_getcomb_ipcomp() +key_getcomb_ipcomp(void) { const struct comp_algo *algo; struct sadb_comb *comb;