diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2013-11-13 14:17:51 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2013-11-14 10:42:07 +0000 |
commit | 501dbf45cd85b0008e599637ad3ca76c044d39d5 (patch) | |
tree | 1094351ff58f1ea0881b9e4ce19da41f3fcafafa | |
parent | 7468a6b740af14d95e8f9bacd2e352ec98a9acf2 (diff) |
sna: Eliminate a compiler warning for a shadowed variable
We don't strictly need that local structure, so do without and keep the
compiler quiet.
sna_driver.c: In function 'fb_supports_depth':
sna_driver.c:414:23: warning: declaration of 'close' shadows a global declaration [-Wshadow]
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r-- | src/sna/sna_driver.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/sna/sna_driver.c b/src/sna/sna_driver.c index 00d90bfd..645746d2 100644 --- a/src/sna/sna_driver.c +++ b/src/sna/sna_driver.c @@ -411,7 +411,6 @@ static Bool fb_supports_depth(int fd, int depth) { struct drm_i915_gem_create create; struct drm_mode_fb_cmd fb; - struct drm_gem_close close; Bool ret; VG_CLEAR(create); @@ -431,9 +430,7 @@ static Bool fb_supports_depth(int fd, int depth) ret = drmIoctl(fd, DRM_IOCTL_MODE_ADDFB, &fb) == 0; drmModeRmFB(fd, fb.fb_id); - VG_CLEAR(close); - close.handle = create.handle; - (void)drmIoctl(fd, DRM_IOCTL_GEM_CLOSE, &close); + (void)drmIoctl(fd, DRM_IOCTL_GEM_CLOSE, &create.handle); return ret; } |