diff options
author | Bart De Schuymer <bdschuym@pandora.be> | 2006-01-23 18:50:54 +0000 |
---|---|---|
committer | Bart De Schuymer <bdschuym@pandora.be> | 2006-01-23 18:50:54 +0000 |
commit | 510c9ce916464d6958c4394169fb5e885f4d3a06 (patch) | |
tree | 8cc6d20db5724c7a2c120306cbd70ec90ab8adfd /extensions | |
parent | 639bbe9d2f41b776bc3384590151265367de01d9 (diff) | |
download | ebtables-510c9ce916464d6958c4394169fb5e885f4d3a06.tar.gz |
remove unsigned char * warning with gcc 4.0
Diffstat (limited to 'extensions')
-rw-r--r-- | extensions/ebt_among.c | 2 | ||||
-rw-r--r-- | extensions/ebt_arp.c | 4 | ||||
-rw-r--r-- | extensions/ebt_log.c | 4 | ||||
-rw-r--r-- | extensions/ebt_stp.c | 14 |
4 files changed, 14 insertions, 10 deletions
diff --git a/extensions/ebt_among.c b/extensions/ebt_among.c index 65ce481..7e01b49 100644 --- a/extensions/ebt_among.c +++ b/extensions/ebt_among.c @@ -375,7 +375,7 @@ static void wormhash_printout(const struct ebt_mac_wormhash *wh) const struct ebt_mac_wormhash_tuple *p; p = (const struct ebt_mac_wormhash_tuple *)(&wh->pool[i]); - ebt_print_mac(((const char *) &p->cmp[0]) + 2); + ebt_print_mac(((const unsigned char *) &p->cmp[0]) + 2); if (p->ip) { ip = (unsigned char *) &p->ip; printf("=%u.%u.%u.%u", ip[0], ip[1], ip[2], ip[3]); diff --git a/extensions/ebt_arp.c b/extensions/ebt_arp.c index 9eed645..ffe6781 100644 --- a/extensions/ebt_arp.c +++ b/extensions/ebt_arp.c @@ -96,8 +96,8 @@ static int parse(int c, char **argv, int argc, const struct ebt_u_entry *entry, char *end; uint32_t *addr; uint32_t *mask; - char *maddr; - char *mmask; + unsigned char *maddr; + unsigned char *mmask; switch (c) { case ARP_OPCODE: diff --git a/extensions/ebt_log.c b/extensions/ebt_log.c index 7429479..575d12e 100644 --- a/extensions/ebt_log.c +++ b/extensions/ebt_log.c @@ -118,7 +118,7 @@ static int parse(int c, char **argv, int argc, const struct ebt_u_entry *entry, ebt_print_error2("Prefix too long"); if (strchr(optarg, '\"')) ebt_print_error2("Use of \\\" is not allowed in the prefix"); - strcpy(loginfo->prefix, optarg); + strcpy((char *)loginfo->prefix, (char *)optarg); break; case LOG_LEVEL: @@ -188,7 +188,7 @@ static int compare(const struct ebt_entry_watcher *w1, return 0; if (loginfo1->bitmask != loginfo2->bitmask) return 0; - return !strcmp(loginfo1->prefix, loginfo2->prefix); + return !strcmp((char *)loginfo1->prefix, (char *)loginfo2->prefix); } static struct ebt_u_watcher log_watcher = diff --git a/extensions/ebt_stp.c b/extensions/ebt_stp.c index 307131f..08a48fb 100644 --- a/extensions/ebt_stp.c +++ b/extensions/ebt_stp.c @@ -236,12 +236,14 @@ static int parse(int c, char **argv, int argc, const struct ebt_u_entry *entry, break; case EBT_STP_ROOTADDR: if (ebt_get_mac_and_mask(argv[optind-1], - stpinfo->config.root_addr, stpinfo->config.root_addrmsk)) + (unsigned char *)stpinfo->config.root_addr, + (unsigned char *)stpinfo->config.root_addrmsk)) ebt_print_error("Bad --stp-root-addr address"); break; case EBT_STP_SENDERADDR: - if (ebt_get_mac_and_mask(argv[optind-1], stpinfo->config.sender_addr, - stpinfo->config.sender_addrmsk)) + if (ebt_get_mac_and_mask(argv[optind-1], + (unsigned char *)stpinfo->config.sender_addr, + (unsigned char *)stpinfo->config.sender_addrmsk)) ebt_print_error("Bad --stp-sender-addr address"); break; default: @@ -293,13 +295,15 @@ static void print(const struct ebt_u_entry *entry, } else if (EBT_STP_ROOTPRIO == (1 << i)) print_range(c->root_priol, c->root_priou); else if (EBT_STP_ROOTADDR == (1 << i)) - ebt_print_mac_and_mask(c->root_addr, c->root_addrmsk); + ebt_print_mac_and_mask((unsigned char *)c->root_addr, + (unsigned char*)c->root_addrmsk); else if (EBT_STP_ROOTCOST == (1 << i)) print_range(c->root_costl, c->root_costu); else if (EBT_STP_SENDERPRIO == (1 << i)) print_range(c->sender_priol, c->sender_priou); else if (EBT_STP_SENDERADDR == (1 << i)) - ebt_print_mac_and_mask(c->sender_addr, c->sender_addrmsk); + ebt_print_mac_and_mask((unsigned char *)c->sender_addr, + (unsigned char *)c->sender_addrmsk); else if (EBT_STP_PORT == (1 << i)) print_range(c->portl, c->portu); else if (EBT_STP_MSGAGE == (1 << i)) |