Re: [PATCH libdrm 7/8] Fix unused, and unused-but-set variables warnings

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 2015-03-13 at 22:56 +0000, Emil Velikov wrote:
> On 27 February 2015 at 18:07, Jan Vesely <jan.vesely@xxxxxxxxxxx> wrote:
> > Signed-off-by: Jan Vesely <jan.vesely@xxxxxxxxxxx>
> > ---
> >  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@xxxxxxxxxxx>

Attachment: signature.asc
Description: This is a digitally signed message part

_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/dri-devel

[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux