mirror of
https://gitlab.freedesktop.org/mesa/drm.git
synced 2025-12-20 04:40:09 +01:00
On 32-bit:
../amdgpu/amdgpu_bo.c: In function ‘amdgpu_find_bo_by_cpu_mapping’:
../amdgpu/amdgpu_bo.c:554:13: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
cpu < (void*)((uintptr_t)bo->cpu_ptr + bo->alloc_size))
^
Indeed, as amdgpu_bo_info.alloc_size is "uint64_t", the sum is
always 64-bit, while "void *" can be 32-bit or 64-bit.
Fix this by casting bo->alloc_size to "size_t", which is either
32-bit or 64-bit, just like "void *".
Fixes:
|
||
|---|---|---|
| .. | ||
| .editorconfig | ||
| amdgpu-symbols.txt | ||
| amdgpu.h | ||
| amdgpu_asic_id.c | ||
| amdgpu_bo.c | ||
| amdgpu_cs.c | ||
| amdgpu_device.c | ||
| amdgpu_gpu_info.c | ||
| amdgpu_internal.h | ||
| amdgpu_vamgr.c | ||
| amdgpu_vm.c | ||
| Android.mk | ||
| handle_table.c | ||
| handle_table.h | ||
| libdrm_amdgpu.pc.in | ||
| Makefile.sources | ||
| meson.build | ||