diff options
author | Behdad Esfahbod <behdad@behdad.org> | 2006-08-08 02:58:50 -0400 |
---|---|---|
committer | Behdad Esfahbod <behdad@behdad.org> | 2006-08-08 02:58:50 -0400 |
commit | 77fd0efa9a055c13e685f4c6b01597ae67a36fb7 (patch) | |
tree | 4a1532f916b0db33038fa667de8656ed3f64b70a /src | |
parent | 56791ab31d484452cd1ddefd653590095d9f6191 (diff) |
Fix few remaining compiler warnings, revealed by -O3
Diffstat (limited to 'src')
-rw-r--r-- | src/cairo-lzw.c | 11 | ||||
-rw-r--r-- | src/cairo-type1-subset.c | 8 |
2 files changed, 9 insertions, 10 deletions
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. */ |