mirror of
https://gitlab.freedesktop.org/wayland/wayland.git
synced 2025-10-31 22:25:25 -04:00
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>
This commit is contained in:
parent
55d044810c
commit
678c8681e2
2 changed files with 4 additions and 6 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue