From 75c7e4b2f8b9e57bb3fb29fb0704edcbe415ea5f Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Thu, 4 Feb 2021 21:00:14 -0800 Subject: [PATCH] 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: d37124b065c ("virgl: add support for VIRGL_CAP_V2_UNTYPED_RESOURCE") Signed-off-by: Vinson Lee Reviewed-by: Chia-I Wu Part-of: --- src/gallium/winsys/virgl/drm/virgl_drm_winsys.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/winsys/virgl/drm/virgl_drm_winsys.c b/src/gallium/winsys/virgl/drm/virgl_drm_winsys.c index bf79ba7ddf7..f0e95eff8a6 100644 --- a/src/gallium/winsys/virgl/drm/virgl_drm_winsys.c +++ b/src/gallium/winsys/virgl/drm/virgl_drm_winsys.c @@ -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); }