virgl: Convert errno to string.

Fix defect reported by Coverity Scan.

Invalid type in argument to printf format specifier (PRINTF_ARGS)
invalid_type: Argument *__errno_location() to format specifier %s was expected to have type char * but has type int.

Fixes: d37124b065 ("virgl: add support for VIRGL_CAP_V2_UNTYPED_RESOURCE")
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8874>
This commit is contained in:
Vinson Lee 2021-02-04 21:00:14 -08:00
parent 09ce403b2d
commit 75c7e4b2f8

View file

@ -563,7 +563,7 @@ virgl_drm_winsys_resource_set_type(struct virgl_winsys *qws,
ret = drmIoctl(qdws->fd, DRM_IOCTL_VIRTGPU_EXECBUFFER, &eb);
if (ret == -1)
_debug_printf("failed to set resource type: %s", errno);
_debug_printf("failed to set resource type: %s", strerror(errno));
mtx_unlock(&qdws->bo_handles_mutex);
}