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>
This commit is contained in:
parent
7468a6b740
commit
501dbf45cd
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue