/* use communication definitions of meg/kilo etc */
static const unsigned long long giga = 1000000000ull;
-static const unsigned long mega = 1000000;
-static const unsigned long kilo = 1000;
+static const unsigned long long mega = 1000000;
+static const unsigned long long kilo = 1000;
void format_rate(FILE *fp, unsigned long long *vals, double *rates, int i)
{
static int print_noaopt(struct action_util *au, FILE *f, struct rtattr *opt)
{
if (opt && RTA_PAYLOAD(opt))
- fprintf(f, "[Unknown action, optlen=%u] ", RTA_PAYLOAD(opt));
+ fprintf(f, "[Unknown action, optlen=%u] ",
+ (unsigned) RTA_PAYLOAD(opt));
return 0;
}
if (tb[TCA_CBQ_OVL_STRATEGY]) {
if (RTA_PAYLOAD(tb[TCA_CBQ_OVL_STRATEGY]) < sizeof(*ovl))
fprintf(stderr, "CBQ: too short overlimit strategy %u/%u\n",
- RTA_PAYLOAD(tb[TCA_CBQ_OVL_STRATEGY]), sizeof(*ovl));
+ (unsigned) RTA_PAYLOAD(tb[TCA_CBQ_OVL_STRATEGY]),
+ (unsigned) sizeof(*ovl));
else
ovl = RTA_DATA(tb[TCA_CBQ_OVL_STRATEGY]);
}
struct rtattr *opt)
{
if (opt && RTA_PAYLOAD(opt))
- fprintf(f, "[Unknown qdisc, optlen=%u] ", RTA_PAYLOAD(opt));
+ fprintf(f, "[Unknown qdisc, optlen=%u] ",
+ (unsigned) RTA_PAYLOAD(opt));
return 0;
}
static int print_nofopt(struct filter_util *qu, FILE *f, struct rtattr *opt, __u32 fhandle)
{
if (opt && RTA_PAYLOAD(opt))
- fprintf(f, "fh %08x [Unknown filter, optlen=%u] ", fhandle, RTA_PAYLOAD(opt));
+ fprintf(f, "fh %08x [Unknown filter, optlen=%u] ",
+ fhandle, (unsigned) RTA_PAYLOAD(opt));
else if (fhandle)
fprintf(f, "fh %08x ", fhandle);
return 0;
if (line[strlen(line)-1]=='\n') {
line[strlen(line)-1] = '\0';
} else {
- fprintf(stderr, "No newline at the end of line, looks like to long (%d chars or more)\n", strlen(line));
+ fprintf(stderr, "No newline at the end of line, looks like to long (%d chars or more)\n",
+ (int) strlen(line));
exit(-1);
}
largc = 0;
largv[largc]=strtok(line, " ");
while ((largv[++largc]=strtok(NULL, " ")) != NULL) {
if (largc > BMAXARG) {
- fprintf(stderr, "Over %d arguments in batch mode, enough!\n", BMAXARG);
+ fprintf(stderr, "Over %d arguments in batch mode, enough!\n",
+ (int) BMAXARG);
exit(-1);
}
}