]> git.ipfire.org Git - thirdparty/iptables.git/commitdiff
fix all compile warnings within iptables extensions (fabrice)
authorFabrice MARIE <fabrice@celestix.com>
Fri, 14 Jun 2002 07:38:16 +0000 (07:38 +0000)
committerHarald Welte <laforge@gnumonks.org>
Fri, 14 Jun 2002 07:38:16 +0000 (07:38 +0000)
extensions/libip6t_REJECT.c
extensions/libip6t_dst.c
extensions/libip6t_hbh.c
extensions/libip6t_rt.c
extensions/libipt_recent.c

index b8b973241c1901af83aaba45207242be7a1e8bae..8c4cc7f348b36beea44c7d04968cdcefb55e02b0 100644 (file)
@@ -110,6 +110,7 @@ parse(int c, char **argv, int invert, unsigned int *flags,
                exit_error(PARAMETER_PROBLEM, "unknown reject type `%s'",optarg);
        default:
                /* Fall through */
+               break;
        }
        return 0;
 }
index 8ec391207c4b05cf6b46fface2022696c29e3103..b1327014e1acc6a3e96b9a392ad654c559020c96 100644 (file)
@@ -184,27 +184,6 @@ final_check(unsigned int flags)
 {
 }
 
-static void
-print_nums(const char *name, u_int32_t min, u_int32_t max,
-           int invert)
-{
-       const char *inv = invert ? "!" : "";
-
-       if (min != 0 || max != 0xFFFFFFFF || invert) {
-               printf("%s", name);
-               if (min == max) {
-                       printf(":%s", inv);
-                       printf("%u", min);
-               } else {
-                       printf("s:%s", inv);
-                       printf("%u",min);
-                       printf(":");
-                       printf("%u",max);
-               }
-               printf(" ");
-       }
-}
-
 static void
 print_options(int optsnr, u_int16_t *optsp)
 {
@@ -234,7 +213,7 @@ print(const struct ip6t_ip6 *ip,
                printf(" ");
        }
        if (optinfo->flags & IP6T_OPTS_OPTS) printf("opts ");
-       print_options(optinfo->optsnr, optinfo->opts);
+       print_options(optinfo->optsnr, (u_int16_t *)optinfo->opts);
        if (optinfo->flags & IP6T_OPTS_NSTRICT) printf("not-strict ");
        if (optinfo->invflags & ~IP6T_OPTS_INV_MASK)
                printf("Unknown invflags: 0x%X ",
@@ -253,7 +232,7 @@ static void save(const struct ip6t_ip6 *ip, const struct ip6t_entry_match *match
        }
 
        if (optinfo->flags & IP6T_OPTS_OPTS) printf("--%s-opts ", LNAME);
-       print_options(optinfo->optsnr, optinfo->opts);
+       print_options(optinfo->optsnr, (u_int16_t *)optinfo->opts);
        if (optinfo->flags & IP6T_OPTS_NSTRICT) printf("--%s-not-strict ", LNAME);
 
 }
index 43b431630b7aa3d27600ec16274602e635b053f9..d0acd4229e644b5950ef0ba0682d2418495d6f6e 100644 (file)
@@ -184,27 +184,6 @@ final_check(unsigned int flags)
 {
 }
 
-static void
-print_nums(const char *name, u_int32_t min, u_int32_t max,
-           int invert)
-{
-       const char *inv = invert ? "!" : "";
-
-       if (min != 0 || max != 0xFFFFFFFF || invert) {
-               printf("%s", name);
-               if (min == max) {
-                       printf(":%s", inv);
-                       printf("%u", min);
-               } else {
-                       printf("s:%s", inv);
-                       printf("%u",min);
-                       printf(":");
-                       printf("%u",max);
-               }
-               printf(" ");
-       }
-}
-
 static void
 print_options(int optsnr, u_int16_t *optsp)
 {
@@ -234,7 +213,7 @@ print(const struct ip6t_ip6 *ip,
                printf(" ");
        }
        if (optinfo->flags & IP6T_OPTS_OPTS) printf("opts ");
-       print_options(optinfo->optsnr, optinfo->opts);
+       print_options(optinfo->optsnr, (u_int16_t *)optinfo->opts);
        if (optinfo->flags & IP6T_OPTS_NSTRICT) printf("not-strict ");
        if (optinfo->invflags & ~IP6T_OPTS_INV_MASK)
                printf("Unknown invflags: 0x%X ",
@@ -253,7 +232,7 @@ static void save(const struct ip6t_ip6 *ip, const struct ip6t_entry_match *match
        }
 
        if (optinfo->flags & IP6T_OPTS_OPTS) printf("--%s-opts ", LNAME);
-       print_options(optinfo->optsnr, optinfo->opts);
+       print_options(optinfo->optsnr, (u_int16_t *)optinfo->opts);
        if (optinfo->flags & IP6T_OPTS_NSTRICT) printf("--%s-not-strict ", LNAME);
 
 }
index b407be13e713935ad4203991c5f67c0d32f49401..06cab1655f41c8c070d37582202575b3b74b6913 100644 (file)
@@ -296,7 +296,7 @@ print(const struct ip6t_ip6 *ip,
        }
        if (rtinfo->flags & IP6T_RT_RES) printf("reserved ");
        if (rtinfo->flags & IP6T_RT_FST) printf("0-addrs ");
-       print_addresses(rtinfo->addrnr, rtinfo->addrs);
+       print_addresses(rtinfo->addrnr, (struct in6_addr *)rtinfo->addrs);
        if (rtinfo->flags & IP6T_RT_FST_NSTRICT) printf("0-not-strict ");
        if (rtinfo->invflags & ~IP6T_RT_INV_MASK)
                printf("Unknown invflags: 0x%X ",
@@ -336,7 +336,7 @@ static void save(const struct ip6t_ip6 *ip, const struct ip6t_entry_match *match
 
        if (rtinfo->flags & IP6T_RT_RES) printf("--rt-0-res ");
        if (rtinfo->flags & IP6T_RT_FST) printf("--rt-0-addrs ");
-       print_addresses(rtinfo->addrnr, rtinfo->addrs);
+       print_addresses(rtinfo->addrnr, (struct in6_addr *)rtinfo->addrs);
        if (rtinfo->flags & IP6T_RT_FST_NSTRICT) printf("--rt-0-not-strict ");
 
 }
index 5b48cd31dbda1f1c917d8b65b1c6b5dc11c7a00a..cda0f3251ec9143a4e02b0fdd437c29e56176854 100644 (file)
@@ -23,7 +23,7 @@ help(void)
 "                                the last 'seconds' seconds.\n"
 "    --hitcount hits             For check and update commands above.\n"
 "                                Specifies that the match will only occur if source address seen hits times.\n"
-"                                May be used in conjunction with the seconds option.\n",
+"                                May be used in conjunction with the seconds option.\n"
 "    --rttl                      For check and update commands above.\n"
 "                                Specifies that the match will only occur if the source address and the TTL\n"
 "                                match between this packet and the one which was set.\n"