diff options
author | Zdenek Kabelac <zkabelac@redhat.com> | 2013-11-25 09:09:27 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2013-11-25 10:04:49 +0000 |
commit | ea18b7780e7d0d7fcd36b656a4fd974fb9d7137d (patch) | |
tree | fbd1cc84f0fd283ed5ce685be0d72deff6c78638 | |
parent | 34057611c67b751c43d6bd70a7d5993708262cd2 (diff) |
Cast to use unsigned math
Signed-off-by: Zdenek Kabelac <zkabelac@redhat.com>
-rw-r--r-- | src/legacy/i810/i810_memory.c | 2 | ||||
-rw-r--r-- | src/sna/sna_accel.c | 2 | ||||
-rw-r--r-- | src/sna/sna_trapezoids.c | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/src/legacy/i810/i810_memory.c b/src/legacy/i810/i810_memory.c index bd7c8db1..c3de2777 100644 --- a/src/legacy/i810/i810_memory.c +++ b/src/legacy/i810/i810_memory.c @@ -73,7 +73,7 @@ I810AllocHigh(I810MemRange * result, I810MemRange * pool, int size) int I810AllocateGARTMemory(ScrnInfoPtr pScrn) { - unsigned long size = pScrn->videoRam * 1024; + unsigned long size = pScrn->videoRam * 1024UL; I810Ptr pI810 = I810PTR(pScrn); int key; long tom = 0; diff --git a/src/sna/sna_accel.c b/src/sna/sna_accel.c index a68e5fb7..8abdf840 100644 --- a/src/sna/sna_accel.c +++ b/src/sna/sna_accel.c @@ -2113,7 +2113,7 @@ skip_inplace_map: pixmap->drawable.bitsPerPixel == 8 || priv->clear_color == (1 << pixmap->drawable.depth) - 1) { memset(pixmap->devPrivate.ptr, priv->clear_color, - pixmap->devKind * pixmap->drawable.height); + (size_t)pixmap->devKind * pixmap->drawable.height); } else { pixman_fill(pixmap->devPrivate.ptr, pixmap->devKind/sizeof(uint32_t), diff --git a/src/sna/sna_trapezoids.c b/src/sna/sna_trapezoids.c index a0a8b5b2..7d133d8f 100644 --- a/src/sna/sna_trapezoids.c +++ b/src/sna/sna_trapezoids.c @@ -902,7 +902,7 @@ triangles_fallback(CARD8 op, if (!scratch) return; - memset(scratch->devPrivate.ptr, 0, scratch->devKind*height); + memset(scratch->devPrivate.ptr, 0, (size_t)scratch->devKind*height); image = pixman_image_create_bits(format, width, height, scratch->devPrivate.ptr, scratch->devKind); |