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 <info@metux.net>
This commit is contained in:
Enrico Weigelt, metux IT consult
2025-08-04 13:15:29 +02:00
committed by Joseph Crowell
parent 24ce266ca1
commit b2ecf72792

View File

@@ -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));
}
}