anv: move variable to proper scope and mark as MAYBE_UNUSED
authorEric Engestrom <eric.engestrom@intel.com>
Tue, 23 Oct 2018 14:37:21 +0000 (15:37 +0100)
committerEric Engestrom <eric.engestrom@intel.com>
Wed, 24 Oct 2018 17:16:20 +0000 (18:16 +0100)
Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
src/intel/vulkan/anv_queue.c

index e0c0a42069f1e52dafeb85feae79f811879b9e07..cf063701b8d0bf71af2c77a4f7a801f8179efcd5 100644 (file)
@@ -542,8 +542,6 @@ anv_wait_for_bo_fences(struct anv_device *device,
                        bool waitAll,
                        uint64_t _timeout)
 {
-   int ret;
-
    /* DRM_IOCTL_I915_GEM_WAIT uses a signed 64 bit timeout and is supposed
     * to block indefinitely timeouts <= 0.  Unfortunately, this was broken
     * for a couple of kernel releases.  Since there's no way to know
@@ -647,6 +645,7 @@ anv_wait_for_bo_fences(struct anv_device *device,
             abstime.tv_nsec = abs_nsec;
             abstime.tv_sec = MIN2(abs_sec, INT_TYPE_MAX(abstime.tv_sec));
 
+            MAYBE_UNUSED int ret;
             ret = pthread_cond_timedwait(&device->queue_submit,
                                          &device->mutex, &abstime);
             assert(ret != EINVAL);