From 454b14949452c4e44990a8f455bcc307306181bc Mon Sep 17 00:00:00 2001 From: Jammy Zhou Date: Mon, 27 Apr 2015 10:29:55 +0800 Subject: [PATCH] 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 Reviewed-by: Jan Vesely Reviewed-by: Emil Velikov --- xf86drm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); }