Adjust function definitions in pf.c to avoid clang 15 warnings
authorDimitry Andric <dim@FreeBSD.org>
Mon, 25 Jul 2022 17:59:59 +0000 (19:59 +0200)
committerDimitry Andric <dim@FreeBSD.org>
Mon, 25 Jul 2022 18:02:31 +0000 (20:02 +0200)
commit503b5870c018ec342be1396896560b720945d7e5
tree71a64a2ccc0972657e6f4a418682de101957071f
parentdba7f4aa0909d8c31a0ca0ad0d1208fabfaa9352
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