git: 503b5870c018 - main - Adjust function definitions in pf.c to avoid clang 15 warnings

From: Dimitry Andric <dim_at_FreeBSD.org>
Date: Mon, 25 Jul 2022 18:02:55 UTC
The branch main has been updated by dim:

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

commit 503b5870c018ec342be1396896560b720945d7e5
Author:     Dimitry Andric <dim@FreeBSD.org>
AuthorDate: 2022-07-25 17:59:59 +0000
Commit:     Dimitry Andric <dim@FreeBSD.org>
CommitDate: 2022-07-25 18:02:31 +0000

    Adjust function definitions in pf.c to avoid clang 15 warnings
    
    With clang 15, the following -Werror warnings are produced:
    
        sys/netpfil/pf/pf.c:985:19: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
        pf_mtag_initialize()
                          ^
                           void
        sys/netpfil/pf/pf.c:995:14: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
        pf_initialize()
                     ^
                      void
        sys/netpfil/pf/pf.c:1089:16: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
        pf_mtag_cleanup()
                       ^
                        void
        sys/netpfil/pf/pf.c:1096:11: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
        pf_cleanup()
                  ^
                   void
        sys/netpfil/pf/pf.c:1989:27: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
        pf_purge_expired_src_nodes()
                                  ^
                                   void
        sys/netpfil/pf/pf.c:2174:24: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
        pf_purge_unlinked_rules()
                               ^
                                void
    
    This is because pf_mtag_initialize(), pf_initialize(),
    pf_mtag_cleanup(), pf_cleanup(), pf_purge_expired_src_nodes(), and
    pf_purge_unlinked_rules() are declared with (void) argument lists, but
    defined with empty argument lists. Make the definitions match the
    declarations.
    
    MFC after:      3 days
---
 sys/netpfil/pf/pf.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c
index d82ec5eafd3c..e2f8b428fb14 100644
--- a/sys/netpfil/pf/pf.c
+++ b/sys/netpfil/pf/pf.c
@@ -982,7 +982,7 @@ pf_free_src_nodes(struct pf_ksrc_node_list *head)
 }
 
 void
-pf_mtag_initialize()
+pf_mtag_initialize(void)
 {
 
 	pf_mtag_z = uma_zcreate("pf mtags", sizeof(struct m_tag) +
@@ -992,7 +992,7 @@ pf_mtag_initialize()
 
 /* Per-vnet data storage structures initialization. */
 void
-pf_initialize()
+pf_initialize(void)
 {
 	struct pf_keyhash	*kh;
 	struct pf_idhash	*ih;
@@ -1086,14 +1086,14 @@ pf_initialize()
 }
 
 void
-pf_mtag_cleanup()
+pf_mtag_cleanup(void)
 {
 
 	uma_zdestroy(pf_mtag_z);
 }
 
 void
-pf_cleanup()
+pf_cleanup(void)
 {
 	struct pf_keyhash	*kh;
 	struct pf_idhash	*ih;
@@ -1986,7 +1986,7 @@ pf_state_expires(const struct pf_kstate *state)
 }
 
 void
-pf_purge_expired_src_nodes()
+pf_purge_expired_src_nodes(void)
 {
 	struct pf_ksrc_node_list	 freelist;
 	struct pf_srchash	*sh;
@@ -2171,7 +2171,7 @@ relock:
 }
 
 static void
-pf_purge_unlinked_rules()
+pf_purge_unlinked_rules(void)
 {
 	struct pf_krulequeue tmpq;
 	struct pf_krule *r, *r1;