diff options
author | Patrick McHardy <kaber@trash.net> | 2005-11-18 18:00:25 +0000 |
---|---|---|
committer | Patrick McHardy <kaber@trash.net> | 2005-11-18 18:00:25 +0000 |
commit | 2739cb813c93a25b036429e48e6bdae98d5c25ad (patch) | |
tree | 277acb4b1c69846a8323d8ba828237cb2c071127 | |
parent | 6656e1378f432ab8690e7d22128793a1ddc5166b (diff) |
Fix some gcc-4 warnings
-rw-r--r-- | extensions/libipt_CLASSIFY.c | 2 | ||||
-rw-r--r-- | extensions/libipt_CLUSTERIP.c | 4 | ||||
-rw-r--r-- | extensions/libipt_string.c | 6 | ||||
-rw-r--r-- | extensions/libipt_tos.c | 2 |
4 files changed, 7 insertions, 7 deletions
diff --git a/extensions/libipt_CLASSIFY.c b/extensions/libipt_CLASSIFY.c index 16c80539..07c9b25e 100644 --- a/extensions/libipt_CLASSIFY.c +++ b/extensions/libipt_CLASSIFY.c @@ -32,7 +32,7 @@ init(struct ipt_entry_target *t, unsigned int *nfcache) { } -int string_to_priority(const unsigned char *s, unsigned int *p) +int string_to_priority(const char *s, unsigned int *p) { unsigned int i, j; diff --git a/extensions/libipt_CLUSTERIP.c b/extensions/libipt_CLUSTERIP.c index 69313527..3268ac53 100644 --- a/extensions/libipt_CLUSTERIP.c +++ b/extensions/libipt_CLUSTERIP.c @@ -120,7 +120,7 @@ parse(int c, char **argv, int invert, unsigned int *flags, exit_error(PARAMETER_PROBLEM, "Can only specify MAC combined with `--new'\n"); if (*flags & PARAM_MAC) exit_error(PARAMETER_PROBLEM, "Can only specify MAC once\n"); - parse_mac(optarg, cipinfo->clustermac); + parse_mac(optarg, (char *)cipinfo->clustermac); if (!(cipinfo->clustermac[0] & 0x01)) exit_error(PARAMETER_PROBLEM, "MAC has to be a multicast ethernet address\n"); *flags |= PARAM_MAC; @@ -169,7 +169,7 @@ final_check(unsigned int flags) if (flags == 0) return; - if (flags & (PARAM_NEW|PARAM_HMODE|PARAM_MAC|PARAM_TOTALNODE|PARAM_LOCALNODE) + if ((flags & (PARAM_NEW|PARAM_HMODE|PARAM_MAC|PARAM_TOTALNODE|PARAM_LOCALNODE)) == (PARAM_NEW|PARAM_HMODE|PARAM_MAC|PARAM_TOTALNODE|PARAM_LOCALNODE)) return; diff --git a/extensions/libipt_string.c b/extensions/libipt_string.c index 2ca90168..8fb013ec 100644 --- a/extensions/libipt_string.c +++ b/extensions/libipt_string.c @@ -63,7 +63,7 @@ init(struct ipt_entry_match *m, unsigned int *nfcache) } static void -parse_string(const unsigned char *s, struct ipt_string_info *info) +parse_string(const char *s, struct ipt_string_info *info) { if (strlen(s) <= IPT_STRING_MAX_PATTERN_SIZE) { strncpy(info->pattern, s, IPT_STRING_MAX_PATTERN_SIZE); @@ -74,7 +74,7 @@ parse_string(const unsigned char *s, struct ipt_string_info *info) } static void -parse_algo(const unsigned char *s, struct ipt_string_info *info) +parse_algo(const char *s, struct ipt_string_info *info) { if (strlen(s) <= IPT_STRING_MAX_ALGO_NAME_SIZE) { strncpy(info->algo, s, IPT_STRING_MAX_ALGO_NAME_SIZE); @@ -84,7 +84,7 @@ parse_algo(const unsigned char *s, struct ipt_string_info *info) } static void -parse_hex_string(const unsigned char *s, struct ipt_string_info *info) +parse_hex_string(const char *s, struct ipt_string_info *info) { int i=0, slen, sindex=0, schar; short hex_f = 0, literal_f = 0; diff --git a/extensions/libipt_tos.c b/extensions/libipt_tos.c index 5b1866e5..f8b5cb49 100644 --- a/extensions/libipt_tos.c +++ b/extensions/libipt_tos.c @@ -51,7 +51,7 @@ static void parse_tos(const char *s, struct ipt_tos_info *info) { unsigned int i; - int tos; + unsigned int tos; if (string_to_number(s, 0, 255, &tos) != -1) { if (tos == IPTOS_LOWDELAY |