Date: Fri, 29 Jul 2022 18:48:22 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: 9424c32010c9 - stable/12 - Adjust ng_{name,ID}_rehash() definitions to avoid clang 15 warnings Message-ID: <202207291848.26TImMew025297@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch stable/12 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=9424c32010c919f720cdd7ed27e42a49a16f1a2e commit 9424c32010c919f720cdd7ed27e42a49a16f1a2e Author: Dimitry Andric <dim@FreeBSD.org> AuthorDate: 2022-07-25 11:04:29 +0000 Commit: Dimitry Andric <dim@FreeBSD.org> CommitDate: 2022-07-29 18:35:37 +0000 Adjust ng_{name,ID}_rehash() definitions to avoid clang 15 warnings With clang 15, the following -Werror warnings are produced: sys/netgraph/ng_base.c:981:15: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes] ng_name_rehash() ^ void sys/netgraph/ng_base.c:1012:13: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes] ng_ID_rehash() ^ void This is because ng_name_rehash() and ng_ID_rehash() 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 dba7f4aa0909d8c31a0ca0ad0d1208fabfaa9352) --- sys/netgraph/ng_base.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/netgraph/ng_base.c b/sys/netgraph/ng_base.c index a2b578c4160f..05798e9f4f20 100644 --- a/sys/netgraph/ng_base.c +++ b/sys/netgraph/ng_base.c @@ -977,7 +977,7 @@ ng_unname(node_p node) * Allocate a bigger name hash. */ static void -ng_name_rehash() +ng_name_rehash(void) { struct nodehash *new; uint32_t hash; @@ -1008,7 +1008,7 @@ ng_name_rehash() * Allocate a bigger ID hash. */ static void -ng_ID_rehash() +ng_ID_rehash(void) { struct nodehash *new; uint32_t hash;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202207291848.26TImMew025297>