From: Eric Anholt Date: Mon, 24 Aug 2020 23:34:46 +0000 (-0700) Subject: drm-shim: Fix unused variable warnings from asserts in release build. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=ccb5e0b02b258e728cd4afb64ba7a75cefad2f09;p=mesa.git drm-shim: Fix unused variable warnings from asserts in release build. Reviewed-by: Alyssa Rosenzweig Part-of: --- 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);