summaryrefslogtreecommitdiff
path: root/src/cairo-lzw.c
diff options
context:
space:
mode:
authorBehdad Esfahbod <behdad@behdad.org>2006-08-08 02:58:50 -0400
committerBehdad Esfahbod <behdad@behdad.org>2006-08-08 02:58:50 -0400
commit77fd0efa9a055c13e685f4c6b01597ae67a36fb7 (patch)
tree4a1532f916b0db33038fa667de8656ed3f64b70a /src/cairo-lzw.c
parent56791ab31d484452cd1ddefd653590095d9f6191 (diff)
downloadcairo-77fd0efa9a055c13e685f4c6b01597ae67a36fb7.tar.gz
Fix few remaining compiler warnings, revealed by -O3
Diffstat (limited to 'src/cairo-lzw.c')
-rw-r--r--src/cairo-lzw.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/cairo-lzw.c b/src/cairo-lzw.c
index d8776db72..ac9ef41bd 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.