Fix -Wpointer-arith warnings

Fixes:
warning: pointer of type ‘void *’ used in arithmetic [-Wpointer-arith]

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
macos/master
Marc-André Lureau 5 years ago
parent d93f600983
commit c7f7d76b47
  1. 2
      vtest/vtest.h
  2. 4
      vtest/vtest_renderer.c

@ -28,7 +28,7 @@
#include <errno.h> #include <errno.h>
struct vtest_buffer { struct vtest_buffer {
const void *buffer; const char *buffer;
int size; int size;
}; };

@ -118,7 +118,7 @@ static void free_iovec(void *value)
static int vtest_block_write(int fd, void *buf, int size) static int vtest_block_write(int fd, void *buf, int size)
{ {
void *ptr = buf; char *ptr = buf;
int left; int left;
int ret; int ret;
left = size; left = size;
@ -139,7 +139,7 @@ static int vtest_block_write(int fd, void *buf, int size)
int vtest_block_read(struct vtest_input *input, void *buf, int size) int vtest_block_read(struct vtest_input *input, void *buf, int size)
{ {
int fd = input->data.fd; int fd = input->data.fd;
void *ptr = buf; char *ptr = buf;
int left; int left;
int ret; int ret;
static int savefd = -1; static int savefd = -1;

Loading…
Cancel
Save