Cast to use unsigned math

Signed-off-by: Zdenek Kabelac <zkabelac@redhat.com>
This commit is contained in:
Zdenek Kabelac 2013-11-25 09:09:27 +01:00 committed by Chris Wilson
parent 34057611c6
commit ea18b7780e
3 changed files with 3 additions and 3 deletions

View File

@ -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;

View File

@ -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),

View File

@ -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);