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.

Signed-off-by: Michael Forney <mforney@mforney.org>
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 @@
 		array->alloc = alloc;
 	}
 
-	p = array->data + array->size;
+	p = (char *)array->data + array->size;
 	array->size += size;
 
 	return p;
diff --git a/tests/array-test.c b/tests/array-test.c
index eda610b..78dfbb0 100644
--- a/tests/array-test.c
+++ b/tests/array-test.c
@@ -87,8 +87,7 @@
 
 	/* verify the data */
 	for (i = 0; i < iterations; ++i) {
-		const int index = datasize * i;
-		struct mydata* check = (struct mydata*)(array.data + index);
+		struct mydata* check = (struct mydata*)array.data + i;
 
 		assert(check->a == i * 3);
 		assert(check->b == 20000 - i);
@@ -121,9 +120,8 @@
 
 	/* check the copy */
 	for (i = 0; i < iterations; i++) {
-		const int index = sizeof(int) * i;
-		int *s = (int *)(source.data + index);
-		int *c = (int *)(copy.data + index);
+		int *s = (int *)source.data + i;
+		int *c = (int *)copy.data + i;
 
 		assert(*s == *c); /* verify the values are the same */
 		assert(s != c); /* ensure the addresses aren't the same */