]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Adjust function definitions in if_pfsync.c to avoid clang 15 warnings
authorDimitry Andric <dim@FreeBSD.org>
Mon, 25 Jul 2022 18:53:32 +0000 (20:53 +0200)
committerDimitry Andric <dim@FreeBSD.org>
Mon, 25 Jul 2022 18:53:53 +0000 (20:53 +0200)
commit766f3c8032a95f344823bea70bb7f794f9939d33
tree2c5b163bd6b9833d437f05b299b30da056b0f75c
parentfb48e998501f8d1defecffb772121a4141cdc2b6
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
sys/netpfil/pf/if_pfsync.c