[PATCH libdrm 7/8] Fix unused, and unused-but-set variables warnings
Emil Velikov
emil.l.velikov at gmail.com
Sat Mar 14 06:14:20 PDT 2015
On 13/03/15 23:37, Jan Vesely wrote:
> 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.
>
Got confused in the #ifdef spaghetti. Comment withdrawn.
Thanks
Emil
More information about the dri-devel
mailing list