[PATCH libdrm 3/8] Fix type-limits, pointer-arith and sign-compare warnings

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Jan Vesely <jan.vesely@xxxxxxxxxxx>
---
 tests/dristat.c  | 4 ++--
 tests/getstats.c | 2 --
 xf86drmMode.c    | 2 +-
 3 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/tests/dristat.c b/tests/dristat.c
index 449aa24..992ceb4 100644
--- a/tests/dristat.c
+++ b/tests/dristat.c
@@ -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;
diff --git a/tests/getstats.c b/tests/getstats.c
index 8d40d0b..8a7d299 100644
--- a/tests/getstats.c
+++ b/tests/getstats.c
@@ -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;
 }
diff --git a/xf86drmMode.c b/xf86drmMode.c
index 1c06a19..61d5e01 100644
--- a/xf86drmMode.c
+++ b/xf86drmMode.c
@@ -76,7 +76,7 @@ static inline int DRM_IOCTL(int fd, unsigned long cmd, void *arg)
  * Util functions
  */
 
-static void* drmAllocCpy(void *array, int count, int entry_size)
+static void* drmAllocCpy(char *array, int count, int entry_size)
 {
 	char *r;
 	int i;
-- 
2.1.0

_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/dri-devel





[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux