[cairo-commit] src/cairo-lzw.c src/cairo-pdf-surface.c

Carl Worth cworth at kemper.freedesktop.org
Wed May 3 16:52:15 PDT 2006


 src/cairo-lzw.c         |    4 ++--
 src/cairo-pdf-surface.c |    4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

New commits:
diff-tree 7beb3e27a552c724bbdb147bc27b775af0d61063 (from 8a174a11395af97bf1bffeca7a6ee8e5c1d50281)
Author: Carl Worth <cworth at cworth.org>
Date:   Wed May 3 16:45:33 2006 -0700

    Quiet some 'may be used uninitialized' warnings.

diff --git a/src/cairo-lzw.c b/src/cairo-lzw.c
index 2a4a8e1..1f48a0a 100644
--- a/src/cairo-lzw.c
+++ b/src/cairo-lzw.c
@@ -324,10 +324,10 @@ _cairo_lzw_compress (unsigned char *data
     int bytes_remaining = *size_in_out;
     lzw_buf_t buf;
     lzw_symbol_table_t table;
-    lzw_symbol_t symbol, *slot;
+    lzw_symbol_t symbol, *slot = NULL; /* just to squelch a warning */
     int code_next = LZW_CODE_FIRST;
     int code_bits = LZW_BITS_MIN;
-    int prev, next;
+    int prev, next = 0; /* just to squelch a warning */
 
     if (*size_in_out == 0)
 	return NULL;
diff --git a/src/cairo-pdf-surface.c b/src/cairo-pdf-surface.c
index d06e91a..a08f50b 100644
--- a/src/cairo-pdf-surface.c
+++ b/src/cairo-pdf-surface.c
@@ -744,7 +744,7 @@ emit_image (cairo_pdf_document_t	*docume
     unsigned long rgb_size, compressed_size;
     pixman_bits_t *pixel;
     int i, x, y;
-    unsigned int smask_id;
+    unsigned int smask_id = 0; /* just to squelch a warning */
     cairo_bool_t need_smask;
 
     /* These are the only image formats we currently support, (which
@@ -882,7 +882,7 @@ emit_surface_pattern (cairo_pdf_surface_
     cairo_image_surface_t *image;
     void *image_extra;
     cairo_status_t status = CAIRO_STATUS_SUCCESS;
-    unsigned int id, alpha;
+    unsigned int alpha, id = 0; /* just to squelch a warning */
     cairo_matrix_t cairo_p2d, pdf_p2d;
     cairo_extend_t extend = cairo_pattern_get_extend (&pattern->base);
     int xstep, ystep;


More information about the cairo-commit mailing list