]> git.ipfire.org Git - thirdparty/xtables-addons.git/commitdiff
build: resolve compiler warnings with gcc-13
authorJan Engelhardt <jengelh@inai.de>
Sun, 2 Apr 2023 16:37:10 +0000 (18:37 +0200)
committerJan Engelhardt <jengelh@inai.de>
Sun, 2 Apr 2023 16:37:10 +0000 (18:37 +0200)
libxt_DNETMAP.c:242:13: warning: ‘_init’ defined but not used [-Wunused-function]
  242 | static void _init(void)

extensions/libxt_DNETMAP.c
extensions/libxt_iface.c
extensions/libxt_length2.c

index e72b467bfaf7d9fb7e1cf3a04b422297c0dc4928..de7ebd60a8a47826e23ce155a4dbdbb8116a13d1 100644 (file)
@@ -239,7 +239,7 @@ static struct xtables_target dnetmap_tg_reg = {
        .extra_opts    = DNETMAP_opts,
 };
 
-static void _init(void)
+static __attribute__((constructor)) void dnetmap_tg_ldr(void)
 {
        xtables_register_target(&dnetmap_tg_reg);
 }
index c85df0c5bd9a8242d91263bcba7915f6ebbe29a4..6dcd11fdc62f6623d964068909be878338d66979 100644 (file)
@@ -221,7 +221,7 @@ static struct xtables_match iface_mt_reg = {
        .extra_opts     = iface_mt_opts,
 };
 
-static void _init(void)
+static __attribute__((constructor)) void iface_mt_ldr(void)
 {
        xtables_register_match(&iface_mt_reg);
 }
index 37fe5df3ca60bad580a2b4c96d2b6d93d0091da4..d3058b43ef9121546a8ea1a80ea40b569971de08 100644 (file)
@@ -152,7 +152,7 @@ static struct xtables_match length2_mt_reg = {
        .extra_opts     = length_mt_opts,
 };
 
-static void _init(void)
+static __attribute__((constructor)) void length2_mt_ldr(void)
 {
        xtables_register_match(&length2_mt_reg);
 }