Fix few remaining compiler warnings, revealed by -O3

This commit is contained in:
Behdad Esfahbod 2006-08-08 02:58:50 -04:00
parent 56791ab31d
commit 77fd0efa9a
3 changed files with 12 additions and 13 deletions

View file

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

View file

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

View file

@ -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. */