blob: cebbf61c2aa1604ecce9ebc63e40c110c2ca618b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
From 09b452f0ac177bd95258ec54f9540fec1a1a817d Mon Sep 17 00:00:00 2001
From: Michael Forney <mforney@mforney.org>
Date: Sat, 1 Jun 2019 15:01:23 -0700
Subject: [PATCH] Avoid pointer arithmetic on `void *`
Upstream: 678c8681e28739da1fea667ae59118cfc0968497
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
|