aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan Vesely2015-02-27 10:51:05 -0600
committerJan Vesely2015-03-14 16:02:06 -0500
commit65041c4a19bc6d1cc86f768259b9e0888af0bd5f (patch)
tree59f620723f2b32e1028c9608ec510bafe73a2f70
parentf11b8c955c270dc4030de58529f2016daa4b91f7 (diff)
downloadexternal-libdrm-65041c4a19bc6d1cc86f768259b9e0888af0bd5f.tar.gz
external-libdrm-65041c4a19bc6d1cc86f768259b9e0888af0bd5f.tar.xz
external-libdrm-65041c4a19bc6d1cc86f768259b9e0888af0bd5f.zip
Fix type-limits, pointer-arith and sign-compare warnings
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu> Reviewed-by: Emil Velikov <eil.l.velikov@gmail.com>
-rw-r--r--tests/dristat.c4
-rw-r--r--tests/getstats.c2
-rw-r--r--xf86drmMode.c2
3 files changed, 3 insertions, 5 deletions
diff --git a/tests/dristat.c b/tests/dristat.c
index 449aa242..992ceb40 100644
--- a/tests/dristat.c
+++ b/tests/dristat.c
@@ -189,9 +189,9 @@ static void printhuman(unsigned long value, const char *name, int mult)
189static void getstats(int fd, int i) 189static void getstats(int fd, int i)
190{ 190{
191 drmStatsT prev, curr; 191 drmStatsT prev, curr;
192 int j; 192 unsigned j;
193 double rate; 193 double rate;
194 194
195 printf(" System statistics:\n"); 195 printf(" System statistics:\n");
196 196
197 if (drmGetStats(fd, &prev)) return; 197 if (drmGetStats(fd, &prev)) return;
diff --git a/tests/getstats.c b/tests/getstats.c
index 8d40d0b3..8a7d2999 100644
--- a/tests/getstats.c
+++ b/tests/getstats.c
@@ -45,8 +45,6 @@ int main(int argc, char **argv)
45 ret = ioctl(fd, DRM_IOCTL_GET_STATS, &stats); 45 ret = ioctl(fd, DRM_IOCTL_GET_STATS, &stats);
46 assert(ret == 0); 46 assert(ret == 0);
47 47
48 assert(stats.count >= 0);
49
50 close(fd); 48 close(fd);
51 return 0; 49 return 0;
52} 50}
diff --git a/xf86drmMode.c b/xf86drmMode.c
index 9ea8fe72..61d5e012 100644
--- a/xf86drmMode.c
+++ b/xf86drmMode.c
@@ -76,7 +76,7 @@ static inline int DRM_IOCTL(int fd, unsigned long cmd, void *arg)
76 * Util functions 76 * Util functions
77 */ 77 */
78 78
79void* drmAllocCpy(void *array, int count, int entry_size) 79static void* drmAllocCpy(char *array, int count, int entry_size)
80{ 80{
81 char *r; 81 char *r;
82 int i; 82 int i;