]> granicus.if.org Git - libnl/commitdiff
[LIBNL]: Fix pointer conversion warnings on 64 bit
authorPatrick McHardy <kaber@trash.net>
Thu, 13 Dec 2007 13:33:37 +0000 (14:33 +0100)
committerThomas Graf <tgr@deb.localdomain>
Thu, 13 Dec 2007 13:33:37 +0000 (14:33 +0100)
nl-tctree-dump.c: In function 'print_class':
nl-tctree-dump.c:31: warning: cast from pointer to integer of different size
nl-tctree-dump.c:44: warning: cast from pointer to integer of different size
nl-tctree-dump.c: In function 'print_qdisc':
nl-tctree-dump.c:55: warning: cast from pointer to integer of different size
nl-tctree-dump.c:64: warning: cast from pointer to integer of different size

Signed-off-by: Patrick McHardy <kaber@trash.net
src/nl-tctree-dump.c

index 6f81fca606977e67f2ebca18bdba974d611c06d0..8b45e7bb07c6824dd6513acf610f957a4e7cd6b9 100644 (file)
@@ -28,7 +28,7 @@ static void print_class(struct nl_object *obj, void *arg)
        struct nl_cache *cls_cache;
        uint32_t parent = rtnl_class_get_handle(class);
 
-       dump_params.dp_prefix = (int)(uint64_t) arg;
+       dump_params.dp_prefix = (int)(long) arg;
        nl_object_dump(obj, &dump_params);
 
        leaf = rtnl_class_leaf_qdisc(class, qdisc_cache);
@@ -41,7 +41,7 @@ static void print_class(struct nl_object *obj, void *arg)
        if (!cls_cache)
                return;
 
-       dump_params.dp_prefix = (int)(uint64_t) arg + 2;
+       dump_params.dp_prefix = (int)(long) arg + 2;
        nl_cache_dump(cls_cache, &dump_params);
        nl_cache_free(cls_cache);
 }
@@ -52,7 +52,7 @@ static void print_qdisc(struct nl_object *obj, void *arg)
        struct nl_cache *cls_cache;
        uint32_t parent = rtnl_qdisc_get_handle(qdisc);
 
-       dump_params.dp_prefix = (int)(uint64_t) arg;
+       dump_params.dp_prefix = (int)(long) arg;
        nl_object_dump(obj, &dump_params);
 
        rtnl_qdisc_foreach_child(qdisc, class_cache, &print_class, arg + 2);
@@ -61,7 +61,7 @@ static void print_qdisc(struct nl_object *obj, void *arg)
        if (!cls_cache)
                return;
 
-       dump_params.dp_prefix = (int)(uint64_t) arg + 2;
+       dump_params.dp_prefix = (int)(long) arg + 2;
        nl_cache_dump(cls_cache, &dump_params);
        nl_cache_free(cls_cache);
 }