diff options
author | gandalf <gandalf> | 2004-05-26 16:04:48 +0000 |
---|---|---|
committer | gandalf <gandalf> | 2004-05-26 16:04:48 +0000 |
commit | c5a2851e96afd3e06785551ab90eb1157407e6cb (patch) | |
tree | bb98ee50030d4eb2757b490aad389e896f4db537 /iptables.c | |
parent | 74c5da055ef1239a504d4624a7e1a1e5e46a5cf0 (diff) |
Get rid of some warnings when compiling 64bit.
Diffstat (limited to 'iptables.c')
-rw-r--r-- | iptables.c | 26 |
1 files changed, 13 insertions, 13 deletions
@@ -829,8 +829,8 @@ parse_target(const char *targetname) if (strlen(targetname)+1 > sizeof(ipt_chainlabel)) exit_error(PARAMETER_PROBLEM, - "Invalid target name `%s' (%i chars max)", - targetname, sizeof(ipt_chainlabel)-1); + "Invalid target name `%s' (%u chars max)", + targetname, (unsigned int)sizeof(ipt_chainlabel)-1); for (ptr = targetname; *ptr; ptr++) if (isspace(*ptr)) @@ -1063,7 +1063,7 @@ register_match(struct iptables_match *me) if (me->size != IPT_ALIGN(me->size)) { fprintf(stderr, "%s: match `%s' has invalid size %u.\n", - program_name, me->name, me->size); + program_name, me->name, (unsigned int)me->size); exit(1); } @@ -1093,7 +1093,7 @@ register_target(struct iptables_target *me) if (me->size != IPT_ALIGN(me->size)) { fprintf(stderr, "%s: target `%s' has invalid size %u.\n", - program_name, me->name, me->size); + program_name, me->name, (unsigned int)me->size); exit(1); } @@ -1116,17 +1116,17 @@ print_num(u_int64_t number, unsigned int format) number = (number + 500) / 1000; if (number > 9999) { number = (number + 500) / 1000; - printf(FMT("%4lluT ","%lluT "), number); + printf(FMT("%4lluT ","%lluT "), (unsigned long long)number); } - else printf(FMT("%4lluG ","%lluG "), number); + else printf(FMT("%4lluG ","%lluG "), (unsigned long long)number); } - else printf(FMT("%4lluM ","%lluM "), number); + else printf(FMT("%4lluM ","%lluM "), (unsigned long long)number); } else - printf(FMT("%4lluK ","%lluK "), number); + printf(FMT("%4lluK ","%lluK "), (unsigned long long)number); } else - printf(FMT("%5llu ","%llu "), number); + printf(FMT("%5llu ","%llu "), (unsigned long long)number); } else - printf(FMT("%8llu ","%llu "), number); + printf(FMT("%8llu ","%llu "), (unsigned long long)number); } @@ -1314,7 +1314,7 @@ print_firewall(const struct ipt_entry *fw, target->print(&fw->ip, t, format & FMT_NUMERIC); } else if (t->u.target_size != sizeof(*t)) printf("[%u bytes of unknown target data] ", - t->u.target_size - sizeof(*t)); + (unsigned int)(t->u.target_size - sizeof(*t))); if (!(format & FMT_NONEWLINE)) fputc('\n', stdout); @@ -2027,12 +2027,12 @@ int do_command(int argc, char *argv[], char **table, iptc_handle_t *handle) "-%c requires packet and byte counter", opt2char(OPT_COUNTERS)); - if (sscanf(pcnt, "%llu", &fw.counters.pcnt) != 1) + if (sscanf(pcnt, "%llu", (unsigned long long *)&fw.counters.pcnt) != 1) exit_error(PARAMETER_PROBLEM, "-%c packet counter not numeric", opt2char(OPT_COUNTERS)); - if (sscanf(bcnt, "%llu", &fw.counters.bcnt) != 1) + if (sscanf(bcnt, "%llu", (unsigned long long *)&fw.counters.bcnt) != 1) exit_error(PARAMETER_PROBLEM, "-%c byte counter not numeric", opt2char(OPT_COUNTERS)); |