[PATCH 4/6] drmOpenDevice: silence compiler warning

Emil Velikov emil.l.velikov at gmail.com
Thu Jan 29 10:47:08 PST 2015


Under 64bit Android the compiler throws a -Wsign-compare warning.
Typecast the variable dev to silence the build.

Signed-off-by: Emil Velikov <emil.l.velikov at gmail.com>
---
 xf86drm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/xf86drm.c b/xf86drm.c
index 345325a..b41c1d8 100644
--- a/xf86drm.c
+++ b/xf86drm.c
@@ -394,7 +394,7 @@ wait_for_udev:
     /* Check if the device node is not what we expect it to be, and recreate it
      * and try again if so.
      */
-    if (st.st_rdev != dev) {
+    if (st.st_rdev != (dev_t)dev) {
 	if (!isroot)
 	    return DRM_ERR_NOT_ROOT;
 	remove(buf);
-- 
2.1.3



More information about the dri-devel mailing list