summaryrefslogtreecommitdiffstats
path: root/extensions
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2005-07-19 22:03:49 +0000
committerHarald Welte <laforge@gnumonks.org>2005-07-19 22:03:49 +0000
commitefa8fc2123a2a9fc229ab471edd2b2688ce1da3a (patch)
tree1cc39b4ef12a42c15e5a21c8fff5a700b3a1dd6b /extensions
parentdaa1ef354deee764484c1494073b075859701971 (diff)
get rid of numerous gcc-4 warnings
Diffstat (limited to 'extensions')
-rw-r--r--extensions/libip6t_length.c2
-rw-r--r--extensions/libip6t_physdev.c5
-rw-r--r--extensions/libipt_DSCP.c4
-rw-r--r--extensions/libipt_TOS.c2
-rw-r--r--extensions/libipt_comment.c4
-rw-r--r--extensions/libipt_dscp.c2
-rw-r--r--extensions/libipt_physdev.c5
-rw-r--r--extensions/libipt_rpc.c2
-rw-r--r--extensions/libipt_tos.c4
-rw-r--r--extensions/libipt_ttl.c2
10 files changed, 17 insertions, 15 deletions
diff --git a/extensions/libip6t_length.c b/extensions/libip6t_length.c
index c944c65e..9f7ba165 100644
--- a/extensions/libip6t_length.c
+++ b/extensions/libip6t_length.c
@@ -30,7 +30,7 @@ static u_int16_t
parse_length(const char *s)
{
- int len;
+ unsigned int len;
if (string_to_number(s, 0, 0xFFFF, &len) == -1)
exit_error(PARAMETER_PROBLEM, "length invalid: `%s'\n", s);
diff --git a/extensions/libip6t_physdev.c b/extensions/libip6t_physdev.c
index fb473470..e7fa22e9 100644
--- a/extensions/libip6t_physdev.c
+++ b/extensions/libip6t_physdev.c
@@ -53,7 +53,8 @@ parse(int c, char **argv, int invert, unsigned int *flags,
if (*flags & IP6T_PHYSDEV_OP_IN)
goto multiple_use;
check_inverse(optarg, &invert, &optind, 0);
- parse_interface(argv[optind-1], info->physindev, info->in_mask);
+ parse_interface(argv[optind-1], info->physindev,
+ (unsigned char *)info->in_mask);
if (invert)
info->invert |= IP6T_PHYSDEV_OP_IN;
info->bitmask |= IP6T_PHYSDEV_OP_IN;
@@ -65,7 +66,7 @@ parse(int c, char **argv, int invert, unsigned int *flags,
goto multiple_use;
check_inverse(optarg, &invert, &optind, 0);
parse_interface(argv[optind-1], info->physoutdev,
- info->out_mask);
+ (unsigned char *)info->out_mask);
if (invert)
info->invert |= IP6T_PHYSDEV_OP_OUT;
info->bitmask |= IP6T_PHYSDEV_OP_OUT;
diff --git a/extensions/libipt_DSCP.c b/extensions/libipt_DSCP.c
index 90e2a344..c50d902b 100644
--- a/extensions/libipt_DSCP.c
+++ b/extensions/libipt_DSCP.c
@@ -49,7 +49,7 @@ static struct option opts[] = {
};
static void
-parse_dscp(const unsigned char *s, struct ipt_DSCP_info *dinfo)
+parse_dscp(const char *s, struct ipt_DSCP_info *dinfo)
{
unsigned int dscp;
@@ -67,7 +67,7 @@ parse_dscp(const unsigned char *s, struct ipt_DSCP_info *dinfo)
static void
-parse_class(const unsigned char *s, struct ipt_DSCP_info *dinfo)
+parse_class(const char *s, struct ipt_DSCP_info *dinfo)
{
unsigned int dscp = class_to_dscp(s);
diff --git a/extensions/libipt_TOS.c b/extensions/libipt_TOS.c
index 4302950d..999f7b02 100644
--- a/extensions/libipt_TOS.c
+++ b/extensions/libipt_TOS.c
@@ -59,7 +59,7 @@ init(struct ipt_entry_target *t, unsigned int *nfcache)
}
static void
-parse_tos(const unsigned char *s, struct ipt_tos_target_info *info)
+parse_tos(const char *s, struct ipt_tos_target_info *info)
{
unsigned int i, tos;
diff --git a/extensions/libipt_comment.c b/extensions/libipt_comment.c
index c543fc69..692acca3 100644
--- a/extensions/libipt_comment.c
+++ b/extensions/libipt_comment.c
@@ -30,7 +30,7 @@ static struct option opts[] = {
};
static void
-parse_comment(const unsigned char *s, struct ipt_comment_info *info)
+parse_comment(const char *s, struct ipt_comment_info *info)
{
int slen = strlen(s);
@@ -38,7 +38,7 @@ parse_comment(const unsigned char *s, struct ipt_comment_info *info)
exit_error(PARAMETER_PROBLEM,
"COMMENT must be shorter than %i characters", IPT_MAX_COMMENT_LEN);
}
- strcpy(info->comment, s);
+ strcpy((char *)info->comment, s);
}
/* Function which parses command options; returns true if it
diff --git a/extensions/libipt_dscp.c b/extensions/libipt_dscp.c
index 4520a6a7..bb19bede 100644
--- a/extensions/libipt_dscp.c
+++ b/extensions/libipt_dscp.c
@@ -46,7 +46,7 @@ static struct option opts[] = {
};
static void
-parse_dscp(const unsigned char *s, struct ipt_dscp_info *dinfo)
+parse_dscp(const char *s, struct ipt_dscp_info *dinfo)
{
unsigned int dscp;
diff --git a/extensions/libipt_physdev.c b/extensions/libipt_physdev.c
index b6dae2ac..28ee8271 100644
--- a/extensions/libipt_physdev.c
+++ b/extensions/libipt_physdev.c
@@ -53,7 +53,8 @@ parse(int c, char **argv, int invert, unsigned int *flags,
if (*flags & IPT_PHYSDEV_OP_IN)
goto multiple_use;
check_inverse(optarg, &invert, &optind, 0);
- parse_interface(argv[optind-1], info->physindev, info->in_mask);
+ parse_interface(argv[optind-1], info->physindev,
+ (unsigned char *)info->in_mask);
if (invert)
info->invert |= IPT_PHYSDEV_OP_IN;
info->bitmask |= IPT_PHYSDEV_OP_IN;
@@ -65,7 +66,7 @@ parse(int c, char **argv, int invert, unsigned int *flags,
goto multiple_use;
check_inverse(optarg, &invert, &optind, 0);
parse_interface(argv[optind-1], info->physoutdev,
- info->out_mask);
+ (unsigned char *)info->out_mask);
if (invert)
info->invert |= IPT_PHYSDEV_OP_OUT;
info->bitmask |= IPT_PHYSDEV_OP_OUT;
diff --git a/extensions/libipt_rpc.c b/extensions/libipt_rpc.c
index f6e897ac..dbfb3962 100644
--- a/extensions/libipt_rpc.c
+++ b/extensions/libipt_rpc.c
@@ -89,7 +89,7 @@ static int k_itoa(char *string, int number)
}
-static int k_atoi(signed char *string)
+static int k_atoi(char *string)
{
unsigned int result = 0;
int maxoctet = IPT_RPC_CHAR_LEN;
diff --git a/extensions/libipt_tos.c b/extensions/libipt_tos.c
index 7a10a502..5b1866e5 100644
--- a/extensions/libipt_tos.c
+++ b/extensions/libipt_tos.c
@@ -48,10 +48,10 @@ static struct option opts[] = {
};
static void
-parse_tos(const unsigned char *s, struct ipt_tos_info *info)
+parse_tos(const char *s, struct ipt_tos_info *info)
{
unsigned int i;
- unsigned int tos;
+ int tos;
if (string_to_number(s, 0, 255, &tos) != -1) {
if (tos == IPTOS_LOWDELAY
diff --git a/extensions/libipt_ttl.c b/extensions/libipt_ttl.c
index 3a25734b..db5b002a 100644
--- a/extensions/libipt_ttl.c
+++ b/extensions/libipt_ttl.c
@@ -29,7 +29,7 @@ static int parse(int c, char **argv, int invert, unsigned int *flags,
struct ipt_entry_match **match)
{
struct ipt_ttl_info *info = (struct ipt_ttl_info *) (*match)->data;
- int value;
+ unsigned int value;
check_inverse(optarg, &invert, &optind, 0);