Fix one warning (v2)
PATCH 2/2 Fix one warning (v2)
xf86drm.c:356:2: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
group = (serv_group >= 0) ? serv_group : DRM_DEV_GID;
^
v2: do 'int' cast to fix the warning
--- xf86drm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
xf86drm.c +1 -1
@@ -353,7 +353,7 @@ static int drmOpenDevice(dev_t dev, int minor, int type) }if (drm_server_info) { - group = (serv_group >=0 ) ? serv_group :DRM_DEV_GID ; + group = ((int )serv_group >=0 ) ? serv_group :DRM_DEV_GID ;chown_check_return (buf, user, group);chmod (buf, devmode); }
Signature · 6 lines
1.9.1 _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 7 lines · Jammy Zhou
xf86drm.c:356:2: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
group = (serv_group>= 0) ?serv_group:DRM_DEV_GID;
^v2: do 'int' cast to fix the warning
Signed-off-by Jammy Zhou <[email protected]>
FWIW
Emil, are you OK with this approach?
Quoted 17 lines
--- xf86drm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)xf86drm.c +1
-1@@ -353,7 +353,7 @@ static int drmOpenDevice(dev_t dev, int minor, int type) }if (drm_server_info) { - group = (serv_group >=0 ) ? serv_group :DRM_DEV_GID ; + group = ((int )serv_group >=0 ) ? serv_group :DRM_DEV_GID ;chown_check_return (buf, user, group);chmod (buf, devmode); }
Signature · 1 line
Jan Vesely <[email protected]>
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 5 lines · Jan Vesely
Quoted 4 lines · Jammy Zhou
xf86drm.c:356:2: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
group = (serv_group>= 0) ?serv_group:DRM_DEV_GID;
^
Quoted 9 lines
Quoted 3 lines
v2: do 'int' cast to fix the warning
Signed-off-by Jammy Zhou <[email protected]>FWIW
Reviewed-by Jan Vesely <[email protected]>Emil, are you OK with this approach?
Ideally one of the old school devs will chip in, but this looks good imho. Lets give it a week or so for other interested parties to chip-in.
-Emil
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel