git: 38fb2140abc2 - stable/13 - Adjust ipfw_iface_{init,destroy}() definitions to avoid clang 15 warning
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sun, 24 Jul 2022 11:01:55 UTC
The branch stable/13 has been updated by dim:
URL: https://cgit.FreeBSD.org/src/commit/?id=38fb2140abc2601064d32a8df23ff7c2c2acbbe2
commit 38fb2140abc2601064d32a8df23ff7c2c2acbbe2
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:00:09 +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 30a943bd8761..4abcc766f6ca 100644
--- a/sys/netpfil/ipfw/ip_fw_iface.c
+++ b/sys/netpfil/ipfw/ip_fw_iface.c
@@ -203,7 +203,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);
@@ -216,7 +216,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);