HomeFreeBSD

Adjust ipfw_{init,destroy}_*() definitions to avoid clang 15 warning

Description

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)

Details

Provenance
dimAuthored on Jul 21 2022, 7:23 PM
Parents
rG4f98ef7bad83: Adjust iface_khandler_deregister() definition to avoid clang 15 warning
Branches
Unknown
Tags
Unknown