From b2ecf727923e4b820c7534e1926e6ec464bb779a Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Mon, 4 Aug 2025 13:15:29 +0200 Subject: [PATCH] xfree86: amdgpu: drmmode_lut_compose() use char* for pointer arithmetics C standard forbids pointer arithmetics on `void*`, only a GNU extension allows that. On FreeBSD we're getting a warning on that. Better adhere to the standard and use `char*` instead of `void*` here. Signed-off-by: Enrico Weigelt, metux IT consult --- src/drmmode_display.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/drmmode_display.c b/src/drmmode_display.c index 2f55c58..0b85c84 100644 --- a/src/drmmode_display.c +++ b/src/drmmode_display.c @@ -802,8 +802,8 @@ static void drmmode_lut_compose(uint16_t *a_red, * values in the LUTs are [0, 1<<16) */ j = a_out_ibmax / max_lut; - *(uint16_t*)((void*)out + (i*struct_size)) = - *(uint16_t*)((void*)b + (j*struct_size)); + *(uint16_t*)((char*)out + (i*struct_size)) = + *(uint16_t*)((char*)b + (j*struct_size)); } }