[PATCH 5/6] drmGetStats: silence compiler warning

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


drm_stats_t::count is of type unsigned long, while i is an int. Make the
latter an unsigned int.
Spotted as -Wsign-compare warning while building under Android 5.

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 b41c1d8..cc79ab6 100644
--- a/xf86drm.c
+++ b/xf86drm.c
@@ -2213,7 +2213,7 @@ int drmGetClient(int fd, int idx, int *auth, int *pid, int *uid,
 int drmGetStats(int fd, drmStatsT *stats)
 {
     drm_stats_t s;
-    int         i;
+    unsigned int i;
 
     if (drmIoctl(fd, DRM_IOCTL_GET_STATS, &s))
 	return -errno;
-- 
2.1.3



More information about the dri-devel mailing list