summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJammy Zhou <Jammy.Zhou@amd.com>2015-04-27 10:29:55 +0800
committerEmil Velikov <emil.l.velikov@gmail.com>2015-05-28 15:49:18 +0100
commit454b14949452c4e44990a8f455bcc307306181bc (patch)
tree244409dbba2ea26162f2bf2df87c5d22adfd3312
parentd0e592d4e9b59d9cc185f1d63b3c1dd818e95098 (diff)
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 Signed-off-by: Jammy Zhou <Jammy.Zhou@amd.com> Reviewed-by: Jan Vesely <jan.vesely@rutgers.edu> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
-rw-r--r--xf86drm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/xf86drm.c b/xf86drm.c
index 2245f995..0a66a4a3 100644
--- a/xf86drm.c
+++ b/xf86drm.c
@@ -349,7 +349,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);
}