From cf71280d74d044325f9b4f26fa26ca7eb7045507 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20Pi=C3=B1eiro?= Date: Thu, 18 Mar 2021 23:13:43 +0100 Subject: [PATCH] v3dv/device: avoid unused-result warning with asprintf Reviewed-by: Iago Toral Quiroga Part-of: --- src/broadcom/vulkan/v3dv_device.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/broadcom/vulkan/v3dv_device.c b/src/broadcom/vulkan/v3dv_device.c index c78044e674d..450b1f9c511 100644 --- a/src/broadcom/vulkan/v3dv_device.c +++ b/src/broadcom/vulkan/v3dv_device.c @@ -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;