Cast to use unsigned math
Signed-off-by: Zdenek Kabelac <zkabelac@redhat.com>
This commit is contained in:
parent
34057611c6
commit
ea18b7780e
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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),
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in New Issue