v3dv/device: avoid unused-result warning with asprintf

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9403>
This commit is contained in:
Alejandro Piñeiro
2021-03-18 23:13:43 +01:00
committed by Marge Bot
parent 2bee6ffec3
commit cf71280d74
+4 -2
View File
@@ -666,8 +666,10 @@ physical_device_init(struct v3dv_physical_device *device,
device->compiler = v3d_compiler_init(&device->devinfo);
device->next_program_id = 0;
asprintf(&device->name, "V3D %d.%d",
device->devinfo.ver / 10, device->devinfo.ver % 10);
ASSERTED int len =
asprintf(&device->name, "V3D %d.%d",
device->devinfo.ver / 10, device->devinfo.ver % 10);
assert(len != -1);
/* Setup available memory heaps and types */
VkPhysicalDeviceMemoryProperties *mem = &device->memory;