[PATCH libdrm 7/8] Fix unused, and unused-but-set variables warnings
Jan Vesely
jan.vesely at rutgers.edu
Fri Mar 13 16:37:41 PDT 2015
On Fri, 2015-03-13 at 22:56 +0000, Emil Velikov wrote:
> On 27 February 2015 at 18:07, Jan Vesely <jan.vesely at rutgers.edu> wrote:
> > Signed-off-by: Jan Vesely <jan.vesely at rutgers.edu>
> > ---
> > tests/exynos/exynos_fimg2d_test.c | 4 +---
> > xf86drm.c | 9 ++++++---
> > 2 files changed, 7 insertions(+), 6 deletions(-)
> >
> ...
> > @@ -333,7 +336,6 @@ static int drmOpenDevice(dev_t dev, int minor, int type)
> > drm_server_info->get_perms(&serv_group, &serv_mode);
> > devmode = serv_mode ? serv_mode : DRM_DEV_MODE;
> > devmode &= ~(S_IXUSR|S_IXGRP|S_IXOTH);
> > - group = (serv_group >= 0) ? serv_group : DRM_DEV_GID;
> > }
> >
> > #if !defined(UDEV)
> > @@ -354,6 +356,7 @@ static int drmOpenDevice(dev_t dev, int minor, int type)
> > }
> >
> > if (drm_server_info) {
> > + group = (serv_group >= 0) ? serv_group : DRM_DEV_GID;
> I think you can leave this back where it was. It doesn't seem to bring
> anything beneficial.
"group" variable is now only available #if !defined(UDEV), so I can;'t
really move it back without adding a pair of ifdefs,
moving it here looked nicer than adding another set of #if/#endif.
I wanted to move the declaration here as well, but I'm not sure how it'd
play with old/broken compilers that need to be supported.
jan
>
> -Emil
--
Jan Vesely <jan.vesely at rutgers.edu>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part
URL: <http://lists.freedesktop.org/archives/dri-devel/attachments/20150313/8cf0c582/attachment.sig>
More information about the dri-devel
mailing list