From 09b452f0ac177bd95258ec54f9540fec1a1a817d Mon Sep 17 00:00:00 2001 From: Michael Forney Date: Sat, 1 Jun 2019 15:01:23 -0700 Subject: [PATCH] Avoid pointer arithmetic on `void *` The pointer operand to the binary `+` operator must be to a complete object type. Since we are working with byte sizes, use `char *` for arithmetic instead. --- src/wayland-util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wayland-util.c b/src/wayland-util.c index 3a471a8..d5973bf 100644 --- a/src/wayland-util.c +++ b/src/wayland-util.c @@ -131,7 +131,7 @@ wl_array_add(struct wl_array *array, size_t size) array->alloc = alloc; } - p = array->data + array->size; + p = (char *)array->data + array->size; array->size += size; return p; -- 2.20.1