summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMichael Forney <mforney@mforney.org>2019-08-11 04:49:07 +0000
committerThomas Haller <thaller@redhat.com>2019-08-16 07:42:03 +0200
commitde72910e6b3ec4503f23538682a89c4d444c7a92 (patch)
treeadb4ac751ff7e9d2cbf3a17d9c2191fb0d80e56f /src
parent1a88619b72c77b5390076ad703bfa3de4fa0348d (diff)
downloadlibnl-de72910e6b3ec4503f23538682a89c4d444c7a92.tar.gz
all: Avoid pointer arithmetic on `void *`
ISO C requires that the pointer operand to the binary + operator be to a complete object type[0]. [0] http://port70.net/~nsz/c/c11/n1570.html#6.5.6p2
Diffstat (limited to 'src')
-rw-r--r--src/nl-tctree-list.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/nl-tctree-list.c b/src/nl-tctree-list.c
index c80093bf..9e03038f 100644
--- a/src/nl-tctree-list.c
+++ b/src/nl-tctree-list.c
@@ -53,9 +53,9 @@ static void print_class(struct nl_object *obj, void *arg)
leaf = rtnl_class_leaf_qdisc(class, qdisc_cache);
if (leaf)
- print_qdisc((struct nl_object *) leaf, arg + 2);
+ print_qdisc((struct nl_object *) leaf, (char *) arg + 2);
- print_tc_childs(TC_CAST(class), arg + 2);
+ print_tc_childs(TC_CAST(class), (char *) arg + 2);
if (rtnl_cls_alloc_cache(sock, ifindex, parent, &cls_cache) < 0)
return;
@@ -88,7 +88,7 @@ static void print_qdisc(struct nl_object *obj, void *arg)
params.dp_prefix = (int)(long) arg;
nl_object_dump(obj, &params);
- print_tc_childs(TC_CAST(qdisc), arg + 2);
+ print_tc_childs(TC_CAST(qdisc), (char *) arg + 2);
if (rtnl_cls_alloc_cache(sock, ifindex, parent, &cls_cache) < 0)
return;