git: a42210214531 - stable/12 - Adjust ipfw_{init,destroy}_*() definitions to avoid clang 15 warning

From: Dimitry Andric <dim_at_FreeBSD.org>
Date: Sun, 24 Jul 2022 11:02:27 UTC
The branch stable/12 has been updated by dim:

URL: https://cgit.FreeBSD.org/src/commit/?id=a42210214531c4e7a8f7f5ed77e1029f69831a14

commit a42210214531c4e7a8f7f5ed77e1029f69831a14
Author:     Dimitry Andric <dim@FreeBSD.org>
AuthorDate: 2022-07-21 19:23:13 +0000
Commit:     Dimitry Andric <dim@FreeBSD.org>
CommitDate: 2022-07-24 11:01:21 +0000

    Adjust ipfw_{init,destroy}_*() definitions to avoid clang 15 warning
    
    With clang 15, the following -Werror warnings are produced:
    
        sys/netpfil/ipfw/ip_fw_sockopt.c:187:19: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
        ipfw_init_counters()
                          ^
                           void
        sys/netpfil/ipfw/ip_fw_sockopt.c:196:22: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
        ipfw_destroy_counters()
                             ^
                              void
        sys/netpfil/ipfw/ip_fw_sockopt.c:3241:23: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
        ipfw_init_obj_rewriter()
                              ^
                               void
        sys/netpfil/ipfw/ip_fw_sockopt.c:3249:26: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
        ipfw_destroy_obj_rewriter()
                                 ^
                                  void
    
    This is because ipfw_init_counters(), ipfw_destroy_counters(),
    ipfw_init_obj_rewriter(), and ipfw_destroy_obj_rewriter() 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 62030bb8538cb3775f6259c81c2c30a533f3ab10)
---
 sys/netpfil/ipfw/ip_fw_sockopt.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/sys/netpfil/ipfw/ip_fw_sockopt.c b/sys/netpfil/ipfw/ip_fw_sockopt.c
index 8414dd67b539..1c6fa930aed6 100644
--- a/sys/netpfil/ipfw/ip_fw_sockopt.c
+++ b/sys/netpfil/ipfw/ip_fw_sockopt.c
@@ -185,7 +185,7 @@ VNET_DEFINE_STATIC(uma_zone_t, ipfw_cntr_zone);
 #define	V_ipfw_cntr_zone		VNET(ipfw_cntr_zone)
 
 void
-ipfw_init_counters()
+ipfw_init_counters(void)
 {
 
 	V_ipfw_cntr_zone = uma_zcreate("IPFW counters",
@@ -194,7 +194,7 @@ ipfw_init_counters()
 }
 
 void
-ipfw_destroy_counters()
+ipfw_destroy_counters(void)
 {
 	
 	uma_zdestroy(V_ipfw_cntr_zone);
@@ -3254,7 +3254,7 @@ update_opcode_kidx(ipfw_insn *cmd, uint16_t idx)
 }
 
 void
-ipfw_init_obj_rewriter()
+ipfw_init_obj_rewriter(void)
 {
 
 	ctl3_rewriters = NULL;
@@ -3262,7 +3262,7 @@ ipfw_init_obj_rewriter()
 }
 
 void
-ipfw_destroy_obj_rewriter()
+ipfw_destroy_obj_rewriter(void)
 {
 
 	if (ctl3_rewriters != NULL)