Date: Sun, 24 Jul 2022 11:02:30 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: 037c0973366c - stable/12 - Adjust ipfw_iface_{init,destroy}() definitions to avoid clang 15 warning Message-ID: <202207241102.26OB2U1t041639@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=037c0973366c29507ed5726e4842acfd49faa444 commit 037c0973366c29507ed5726e4842acfd49faa444 Author: Dimitry Andric <dim@FreeBSD.org> AuthorDate: 2022-07-21 19:37:09 +0000 Commit: Dimitry Andric <dim@FreeBSD.org> CommitDate: 2022-07-24 11:01:21 +0000 Adjust ipfw_iface_{init,destroy}() definitions to avoid clang 15 warning With clang 15, the following -Werror warnings are produced: sys/netpfil/ipfw/ip_fw_iface.c:206:16: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes] ipfw_iface_init() ^ void sys/netpfil/ipfw/ip_fw_iface.c:219:19: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes] ipfw_iface_destroy() ^ void This is because ipfw_iface_init() and ipfw_iface_destroy() 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 1eea6b9097834484f2238298f550bb418901c313) --- sys/netpfil/ipfw/ip_fw_iface.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/netpfil/ipfw/ip_fw_iface.c b/sys/netpfil/ipfw/ip_fw_iface.c index 8b6b64727007..13b6bc4a8b45 100644 --- a/sys/netpfil/ipfw/ip_fw_iface.c +++ b/sys/netpfil/ipfw/ip_fw_iface.c @@ -204,7 +204,7 @@ ipfw_kiflookup(char *name) * mutex init. */ int -ipfw_iface_init() +ipfw_iface_init(void) { mtx_init(&vnet_mtx, "IPFW ifhandler mtx", NULL, MTX_DEF); @@ -217,7 +217,7 @@ ipfw_iface_init() * Unregister khandlers iff init has been done. */ void -ipfw_iface_destroy() +ipfw_iface_destroy(void) { IPFW_DEL_SOPT_HANDLER(1, scodes);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202207241102.26OB2U1t041639>