summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pixman/src/ictri.c6
-rw-r--r--src/cairo-lzw.c11
-rw-r--r--src/cairo-type1-subset.c8
3 files changed, 12 insertions, 13 deletions
diff --git a/pixman/src/ictri.c b/pixman/src/ictri.c
index 09902abd..40802399 100644
--- a/pixman/src/ictri.c
+++ b/pixman/src/ictri.c
@@ -143,7 +143,7 @@ pixman_composite_triangles (pixman_operator_t op,
const pixman_triangle_t *tris,
int ntris)
{
- pixman_box16_t bounds;
+ pixman_box16_t bounds = {0, 0, 0, 0}; /* shut gcc up */
pixman_image_t *image = NULL;
int xDst, yDst;
int xRel, yRel;
@@ -215,7 +215,7 @@ pixman_composite_tri_strip (pixman_operator_t op,
int npoints)
{
pixman_triangle_t tri;
- pixman_box16_t bounds;
+ pixman_box16_t bounds = {0, 0, 0, 0}; /* shut gcc up */
pixman_image_t *image = NULL;
int xDst, yDst;
int xRel, yRel;
@@ -292,7 +292,7 @@ pixman_composite_tri_fan (pixman_operator_t op,
int npoints)
{
pixman_triangle_t tri;
- pixman_box16_t bounds;
+ pixman_box16_t bounds = {0, 0, 0, 0}; /* shut gcc up */
pixman_image_t *image = NULL;
const pixman_point_fixed_t *first;
int xDst, yDst;
diff --git a/src/cairo-lzw.c b/src/cairo-lzw.c
index d8776db7..ac9ef41b 100644
--- a/src/cairo-lzw.c
+++ b/src/cairo-lzw.c
@@ -43,7 +43,7 @@ typedef struct _lzw_buf {
int data_size;
int num_data;
uint32_t pending;
- int pending_bits;
+ unsigned int pending_bits;
} lzw_buf_t;
/* An lzw_buf_t is a simple, growable chunk of memory for holding
@@ -67,6 +67,10 @@ _lzw_buf_init (lzw_buf_t *buf, int size)
size = 16;
buf->status = CAIRO_STATUS_SUCCESS;
+ buf->data_size = size;
+ buf->num_data = 0;
+ buf->pending = 0;
+ buf->pending_bits = 0;
buf->data = malloc (size);
if (buf->data == NULL) {
@@ -74,11 +78,6 @@ _lzw_buf_init (lzw_buf_t *buf, int size)
buf->status = CAIRO_STATUS_NO_MEMORY;
return;
}
-
- buf->data_size = size;
- buf->num_data = 0;
- buf->pending = 0;
- buf->pending_bits = 0;
}
/* Increase the buffer size by doubling.
diff --git a/src/cairo-type1-subset.c b/src/cairo-type1-subset.c
index 26ac97a4..52f05f89 100644
--- a/src/cairo-type1-subset.c
+++ b/src/cairo-type1-subset.c
@@ -252,7 +252,7 @@ cairo_type1_font_subset_write_header (cairo_type1_font_subset_t *font,
const char *name)
{
const char *start, *end, *segment_end;
- int i;
+ unsigned int i;
segment_end = font->header_segment + font->header_segment_size;
@@ -399,7 +399,7 @@ static int
cairo_type1_font_subset_lookup_glyph (cairo_type1_font_subset_t *font,
const char *glyph_name, int length)
{
- int i;
+ unsigned int i;
for (i = 0; i < font->base.num_glyphs; i++) {
if (font->glyphs[i].name &&
@@ -414,7 +414,7 @@ cairo_type1_font_subset_lookup_glyph (cairo_type1_font_subset_t *font,
static cairo_status_t
cairo_type1_font_subset_get_glyph_names_and_widths (cairo_type1_font_subset_t *font)
{
- int i;
+ unsigned int i;
char buffer[256];
FT_Error error;
@@ -929,7 +929,7 @@ static void
cairo_type1_font_subset_destroy (void *abstract_font)
{
cairo_type1_font_subset_t *font = abstract_font;
- int i;
+ unsigned int i;
/* If the subset generation failed, some of the pointers below may
* be NULL depending on at which point the error occurred. */