summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2011-11-02 10:03:45 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2011-11-02 10:03:45 +0000
commit6553c9e1cbfcecf781ba106de99f9e70c6d373ba (patch)
tree109ba7319c92a98e61b8c2fee0416c7095bed3d7
parent42e2036cda6b76f2b64e28a81bdaa661e4cbffa5 (diff)
sna: Quieten a fewer compiler sign compare warnings
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r--src/common.h8
-rw-r--r--src/intel_module.c2
-rw-r--r--src/sna/kgem.c2
-rw-r--r--src/sna/sna_accel.c12
-rw-r--r--src/sna/sna_blt.c4
-rw-r--r--src/sna/sna_dri.c2
6 files changed, 15 insertions, 15 deletions
diff --git a/src/common.h b/src/common.h
index 6f23cdd8..6b9c3151 100644
--- a/src/common.h
+++ b/src/common.h
@@ -97,8 +97,8 @@ extern void I830DPRINTF_stub(const char *filename, int line,
static inline void memset_volatile(volatile void *b, int c, size_t len)
{
- int i;
-
+ size_t i;
+
for (i = 0; i < len; i++)
((volatile char *)b)[i] = c;
}
@@ -106,8 +106,8 @@ static inline void memset_volatile(volatile void *b, int c, size_t len)
static inline void memcpy_volatile(volatile void *dst, const void *src,
size_t len)
{
- int i;
-
+ size_t i;
+
for (i = 0; i < len; i++)
((volatile char *)dst)[i] = ((volatile char *)src)[i];
}
diff --git a/src/intel_module.c b/src/intel_module.c
index cd9c1a38..3a0ecc9a 100644
--- a/src/intel_module.c
+++ b/src/intel_module.c
@@ -299,7 +299,7 @@ static Bool intel_pci_probe(DriverPtr driver,
{
ScrnInfoPtr scrn;
PciChipsets intel_pci_chipsets[ARRAY_SIZE(_intel_chipsets)];
- int i;
+ unsigned i;
chipset_info = (void *)match_data;
diff --git a/src/sna/kgem.c b/src/sna/kgem.c
index 60ae5caa..7770175c 100644
--- a/src/sna/kgem.c
+++ b/src/sna/kgem.c
@@ -1954,7 +1954,7 @@ struct kgem_bo *kgem_create_buffer(struct kgem *kgem,
{
struct kgem_partial_bo *bo;
bool write = !!(flags & KGEM_BUFFER_WRITE);
- int offset, alloc;
+ unsigned offset, alloc;
uint32_t handle;
DBG(("%s: size=%d, flags=%x [write=%d, last=%d]\n",
diff --git a/src/sna/sna_accel.c b/src/sna/sna_accel.c
index 4fc13372..f70a3122 100644
--- a/src/sna/sna_accel.c
+++ b/src/sna/sna_accel.c
@@ -1559,7 +1559,7 @@ sna_put_xypixmap_blt(DrawablePtr drawable, GCPtr gc, RegionPtr region,
b = sna->kgem.batch + sna->kgem.nbatch;
b[0] = XY_FULL_MONO_PATTERN_MONO_SRC_BLT;
- if (drawable->bitsPerPixel >=3224)
+ if (drawable->bitsPerPixel == 32)
b[0] |= 3 << 20;
b[0] |= ((box->x1 - x) & 7) << 17;
b[1] = bo->pitch;
@@ -3170,7 +3170,7 @@ sna_poly_point_blt(DrawablePtr drawable,
sna_damage_add_points(damage, pt, n, last.x, last.y);
do {
- int nbox = n;
+ unsigned nbox = n;
if (nbox > ARRAY_SIZE(box))
nbox = ARRAY_SIZE(box);
n -= nbox;
@@ -4114,7 +4114,7 @@ sna_poly_segment_blt(DrawablePtr drawable,
dy += drawable->y;
if (dx|dy) {
do {
- int nbox = n;
+ unsigned nbox = n;
if (nbox > ARRAY_SIZE(boxes))
nbox = ARRAY_SIZE(boxes);
n -= nbox;
@@ -4160,7 +4160,7 @@ sna_poly_segment_blt(DrawablePtr drawable,
} while (n);
} else {
do {
- int nbox = n;
+ unsigned nbox = n;
if (nbox > ARRAY_SIZE(boxes))
nbox = ARRAY_SIZE(boxes);
n -= nbox;
@@ -5576,7 +5576,7 @@ sna_poly_fill_rect_blt(DrawablePtr drawable,
sna_damage_add_rectangles(damage, rect, n, dx, dy);
if (dx|dy) {
do {
- int nbox = n;
+ unsigned nbox = n;
if (nbox > ARRAY_SIZE(boxes))
nbox = ARRAY_SIZE(boxes);
n -= nbox;
@@ -5593,7 +5593,7 @@ sna_poly_fill_rect_blt(DrawablePtr drawable,
} while (n);
} else {
do {
- int nbox = n;
+ unsigned nbox = n;
if (nbox > ARRAY_SIZE(boxes))
nbox = ARRAY_SIZE(boxes);
n -= nbox;
diff --git a/src/sna/sna_blt.c b/src/sna/sna_blt.c
index 12dd2a04..5420712f 100644
--- a/src/sna/sna_blt.c
+++ b/src/sna/sna_blt.c
@@ -632,7 +632,7 @@ pixel_is_white(uint32_t pixel, uint32_t format)
case PICT_TYPE_ARGB:
case PICT_TYPE_ABGR:
case PICT_TYPE_BGRA:
- return pixel == ((1 << PICT_FORMAT_BPP(format)) - 1);
+ return pixel == ((1U << PICT_FORMAT_BPP(format)) - 1);
default:
return FALSE;
}
@@ -1730,7 +1730,7 @@ Bool sna_blt_copy_boxes(struct sna *sna, uint8_t alu,
int bpp, const BoxRec *box, int nbox)
{
struct kgem *kgem = &sna->kgem;
- int src_pitch, br13, cmd;
+ unsigned src_pitch, br13, cmd;
#if DEBUG_NO_BLT || NO_BLT_COPY_BOXES
return FALSE;
diff --git a/src/sna/sna_dri.c b/src/sna/sna_dri.c
index f7240264..d21cfb12 100644
--- a/src/sna/sna_dri.c
+++ b/src/sna/sna_dri.c
@@ -96,7 +96,7 @@ struct sna_dri_frame_event {
XID drawable_id;
ClientPtr client;
enum frame_event_type type;
- int frame;
+ unsigned frame;
int pipe;
int count;