shithub: jbig2

Download patch

ref: ca77e2fee1e77118981d33fb1b9ab5803717e343
parent: 09e114b5849ac066755ae1625104896d232ef168
author: giles <giles@ded80894-8fb9-0310-811b-c03f3676ab4d>
date: Thu Apr 8 04:40:49 EDT 2004

Initialize some variables to avoid spurious warnings from gcc.

These are all used only in one code path or another, so there was no 
danger of unitialized use. However, by the same token we lose nothing by 
setting a default to quiet the warning.


git-svn-id: http://svn.ghostscript.com/jbig2dec/trunk@311 ded80894-8fb9-0310-811b-c03f3676ab4d

--- a/jbig2_text.c
+++ b/jbig2_text.c
@@ -107,13 +107,13 @@
     bool first_symbol;
     uint32_t index, max_id;
     Jbig2Image *IB;
-    Jbig2ArithState *as;
+    Jbig2ArithState *as = NULL;
     Jbig2ArithIntCtx *IADT = NULL;
     Jbig2ArithIntCtx *IAFS = NULL;
     Jbig2ArithIntCtx *IADS = NULL;
     Jbig2ArithIntCtx *IAIT = NULL;
     Jbig2ArithIaidCtx *IAID = NULL;
-    int code;
+    int code = 0;
     
     max_id = 0;
     for (index = 0; index < n_dicts; index++) {
@@ -294,7 +294,7 @@
     uint16_t flags;
     uint16_t huffman_flags = 0;
     int8_t sbrat[4];
-    int code;
+    int code = 0;
     
     /* 7.4.1 */
     if (segment->data_length < 17)