From 309f4067a795219027f523bf0733692e48f2fd58 Mon Sep 17 00:00:00 2001 From: Emil Velikov Date: Sun, 16 Apr 2017 14:39:03 +0100 Subject: [PATCH] winsys/sw/dri: don't use GNU void pointer arithmetic MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Resolves build issues like the following: src/gallium/winsys/sw/dri/dri_sw_winsys.c:203:31: error: pointer of type ‘void *’ used in arithmetic [-Werror=pointer-arith] data = dri_sw_dt->data + (dri_sw_dt->stride * box->y) + box->x * blsize; ^ src/gallium/winsys/sw/dri/dri_sw_winsys.c:203:62: error: pointer of type ‘void *’ used in arithmetic [-Werror=pointer-arith] data = dri_sw_dt->data + (dri_sw_dt->stride * box->y) + box->x * blsize; ^ Cc: Signed-off-by: Emil Velikov Reviewed-by: Nicolai Hähnle --- src/gallium/winsys/sw/dri/dri_sw_winsys.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/winsys/sw/dri/dri_sw_winsys.c b/src/gallium/winsys/sw/dri/dri_sw_winsys.c index 94d5092405e..00849985d6b 100644 --- a/src/gallium/winsys/sw/dri/dri_sw_winsys.c +++ b/src/gallium/winsys/sw/dri/dri_sw_winsys.c @@ -200,7 +200,7 @@ dri_sw_displaytarget_display(struct sw_winsys *ws, if (box) { void *data; - data = dri_sw_dt->data + (dri_sw_dt->stride * box->y) + box->x * blsize; + data = (char *)dri_sw_dt->data + (dri_sw_dt->stride * box->y) + box->x * blsize; dri_sw_ws->lf->put_image2(dri_drawable, data, box->x, box->y, box->width, box->height, dri_sw_dt->stride); } else { -- 2.30.2