Date: Fri, 29 Jul 2022 18:47:45 GMT From: Dimitry Andric <dim@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Subject: git: 823283ab45b8 - stable/13 - Adjust function definitions in netipsec's key.c to avoid clang 15 warnings Message-ID: <202207291847.26TIlj3U024525@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch stable/13 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=823283ab45b8e705dbe6c44a6570e50d0151ae65 commit 823283ab45b8e705dbe6c44a6570e50d0151ae65 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:31:12 +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 b9d867a1d83a..4bb46cd9a5c1 100644 --- a/sys/netipsec/key.c +++ b/sys/netipsec/key.c @@ -6377,7 +6377,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; @@ -6434,7 +6434,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;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202207291847.26TIlj3U024525>