diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2022-07-25 18:53:32 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2022-07-29 18:35:36 +0000 |
commit | a9aa00437bd89b8d4e8d24afdd32f8553b5e38ed (patch) | |
tree | cd7a9abedf33782200b141f5ee28315ce29c8360 | |
parent | 61cc49884d268d4b7f71645fe81f5af544b55433 (diff) | |
download | src-a9aa00437bd89b8d4e8d24afdd32f8553b5e38ed.tar.gz src-a9aa00437bd89b8d4e8d24afdd32f8553b5e38ed.zip |
Adjust function definitions in if_pfsync.c to avoid clang 15 warnings
With clang 15, the following -Werror warnings are produced:
sys/netpfil/pf/if_pfsync.c:2439:21: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
pfsync_pointers_init()
^
void
sys/netpfil/pf/if_pfsync.c:2453:23: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
pfsync_pointers_uninit()
^
void
sys/netpfil/pf/if_pfsync.c:2503:12: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
pfsync_init()
^
void
sys/netpfil/pf/if_pfsync.c:2524:14: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
pfsync_uninit()
^
void
This is because pfsync_pointers_init(), pfsync_pointers_uninit(),
pfsync_init(), and pfsync_uninit() 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 766f3c8032a95f344823bea70bb7f794f9939d33)
-rw-r--r-- | sys/netpfil/pf/if_pfsync.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/netpfil/pf/if_pfsync.c b/sys/netpfil/pf/if_pfsync.c index da1d17452cb0..88b85398db58 100644 --- a/sys/netpfil/pf/if_pfsync.c +++ b/sys/netpfil/pf/if_pfsync.c @@ -2433,7 +2433,7 @@ static struct protosw in_pfsync_protosw = { #endif static void -pfsync_pointers_init() +pfsync_pointers_init(void) { PF_RULES_WLOCK(); @@ -2447,7 +2447,7 @@ pfsync_pointers_init() } static void -pfsync_pointers_uninit() +pfsync_pointers_uninit(void) { PF_RULES_WLOCK(); @@ -2497,7 +2497,7 @@ VNET_SYSUNINIT(vnet_pfsync_uninit, SI_SUB_PROTO_FIREWALL, SI_ORDER_FOURTH, vnet_pfsync_uninit, NULL); static int -pfsync_init() +pfsync_init(void) { #ifdef INET int error; @@ -2518,7 +2518,7 @@ pfsync_init() } static void -pfsync_uninit() +pfsync_uninit(void) { pfsync_detach_ifnet_ptr = NULL; |