From ccb5e0b02b258e728cd4afb64ba7a75cefad2f09 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Mon, 24 Aug 2020 16:34:46 -0700 Subject: [PATCH] drm-shim: Fix unused variable warnings from asserts in release build. Reviewed-by: Alyssa Rosenzweig Part-of: --- src/drm-shim/device.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/drm-shim/device.c b/src/drm-shim/device.c index 97bb1183ea8..0a7dfe7fb6d 100644 --- a/src/drm-shim/device.c +++ b/src/drm-shim/device.c @@ -85,7 +85,7 @@ drm_shim_device_init(void) shim_device.mem_fd = memfd_create("shim mem", MFD_CLOEXEC); assert(shim_device.mem_fd != -1); - int ret = ftruncate(shim_device.mem_fd, SHIM_MEM_SIZE); + ASSERTED int ret = ftruncate(shim_device.mem_fd, SHIM_MEM_SIZE); assert(ret == 0); util_vma_heap_init(&shim_device.mem_heap, 4096, SHIM_MEM_SIZE - 4096); @@ -233,7 +233,7 @@ ioctl_fn_t core_ioctls[] = { int drm_shim_ioctl(int fd, unsigned long request, void *arg) { - int type = _IOC_TYPE(request); + ASSERTED int type = _IOC_TYPE(request); int nr = _IOC_NR(request); assert(type == DRM_IOCTL_BASE); -- 2.30.2