Fix type-limits, pointer-arith and sign-compare warnings
authorJan Vesely <jan.vesely@rutgers.edu>
Fri, 27 Feb 2015 16:51:05 +0000 (11:51 -0500)
committerJan Vesely <jan.vesely@rutgers.edu>
Sat, 14 Mar 2015 21:02:06 +0000 (17:02 -0400)
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Reviewed-by: Emil Velikov <eil.l.velikov@gmail.com>
tests/dristat.c
tests/getstats.c
xf86drmMode.c

index 449aa24..992ceb4 100644 (file)
@@ -189,9 +189,9 @@ static void printhuman(unsigned long value, const char *name, int mult)
 static void getstats(int fd, int i)
 {
     drmStatsT prev, curr;
-    int       j;
+    unsigned  j;
     double    rate;
-    
+
     printf("  System statistics:\n");
 
     if (drmGetStats(fd, &prev)) return;
index 8d40d0b..8a7d299 100644 (file)
@@ -45,8 +45,6 @@ int main(int argc, char **argv)
        ret = ioctl(fd, DRM_IOCTL_GET_STATS, &stats);
        assert(ret == 0);
 
-       assert(stats.count >= 0);
-
        close(fd);
        return 0;
 }
index 9ea8fe7..61d5e01 100644 (file)
@@ -76,7 +76,7 @@ static inline int DRM_IOCTL(int fd, unsigned long cmd, void *arg)
  * Util functions
  */
 
-void* drmAllocCpy(void *array, int count, int entry_size)
+static void* drmAllocCpy(char *array, int count, int entry_size)
 {
        char *r;
        int i;