]> rtime.felk.cvut.cz Git - lisovros/iproute2_canprio.git/commitdiff
Fix build warnings on x86_64
authorosdl.net!shemminger <osdl.net!shemminger>
Wed, 6 Oct 2004 23:17:10 +0000 (23:17 +0000)
committerosdl.net!shemminger <osdl.net!shemminger>
Wed, 6 Oct 2004 23:17:10 +0000 (23:17 +0000)
(Logical change 1.92)

misc/ifstat.c
tc/m_action.c
tc/q_cbq.c
tc/tc.c

index 54afce4f279e907a74b4123e7bf822393fa08624..b6f1b870339b247c6abe47c4898c84eb7d7e6165 100644 (file)
@@ -240,8 +240,8 @@ void dump_raw_db(FILE *fp, int to_hist)
 
 /* 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)
 {
index 6d730630352beaec948e2c47ea906e0a6ae76103..f6edc0d5e0cdeaca18297621bded5c1dacd39f3b 100644 (file)
@@ -45,7 +45,8 @@ void act_usage(void)
 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;
 }
 
index b3973d3fefd8dfff7677ad2c5349c89e65976362..82a69ee26cad5c289616d7dbeca58fadaeff8232 100644 (file)
@@ -452,7 +452,8 @@ static int cbq_print_opt(struct qdisc_util *qu, FILE *f, struct rtattr *opt)
        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]);
        }
diff --git a/tc/tc.c b/tc/tc.c
index 0e2df403a0d368a10e8c4c809a5ec553f7a3c7cb..3a76caab6758de01934d48ef575e0e38dbddedfc 100644 (file)
--- a/tc/tc.c
+++ b/tc/tc.c
@@ -44,7 +44,8 @@ static int print_noqopt(struct qdisc_util *qu, FILE *f,
                        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;
 }
 
@@ -60,7 +61,8 @@ static int parse_noqopt(struct qdisc_util *qu, int argc, char **argv, struct nlm
 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;
@@ -226,14 +228,16 @@ int main(int argc, char **argv)
                        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);
                                }
                        }