git: 5e5cf7e2aad4 - stable/13 - Adjust ipfw_{init,destroy}_sopt_handler() definitions to avoid clang 15 warning
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sun, 24 Jul 2022 11:01:45 UTC
The branch stable/13 has been updated by dim:
URL: https://cgit.FreeBSD.org/src/commit/?id=5e5cf7e2aad4f605499a418255b9a77532d87bbe
commit 5e5cf7e2aad4f605499a418255b9a77532d87bbe
Author: Dimitry Andric <dim@FreeBSD.org>
AuthorDate: 2022-07-21 19:30:05 +0000
Commit: Dimitry Andric <dim@FreeBSD.org>
CommitDate: 2022-07-24 11:00:08 +0000
Adjust ipfw_{init,destroy}_sopt_handler() definitions to avoid clang 15 warning
With clang 15, the following -Werror warning are produced:
sys/netpfil/ipfw/ip_fw_sockopt.c:3477:23: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
ipfw_init_sopt_handler()
^
void
sys/netpfil/ipfw/ip_fw_sockopt.c:3485:26: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
ipfw_destroy_sopt_handler()
^
void
This is because ipfw_init_sopt_handler() and ipfw_destroy_sopt_handler()
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 d62830c5e493133b0212f39c7efdab4232f87abf)
---
sys/netpfil/ipfw/ip_fw_sockopt.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/sys/netpfil/ipfw/ip_fw_sockopt.c b/sys/netpfil/ipfw/ip_fw_sockopt.c
index 3f564c459f96..0656d941e912 100644
--- a/sys/netpfil/ipfw/ip_fw_sockopt.c
+++ b/sys/netpfil/ipfw/ip_fw_sockopt.c
@@ -3476,7 +3476,7 @@ find_unref_sh(struct ipfw_sopt_handler *psh)
}
void
-ipfw_init_sopt_handler()
+ipfw_init_sopt_handler(void)
{
CTL3_LOCK_INIT();
@@ -3484,7 +3484,7 @@ ipfw_init_sopt_handler()
}
void
-ipfw_destroy_sopt_handler()
+ipfw_destroy_sopt_handler(void)
{
IPFW_DEL_SOPT_HANDLER(1, scodes);