shithub: jbig2

Download patch

ref: e37802e46e06e7c3d9f01d626b244771bcad76a1
parent: 1b311c624ce08c9c702ba4e88e2b0d787830334d
author: Shailesh Mistry <shailesh.mistry@hotmail.co.uk>
date: Tue Jul 3 18:52:19 EDT 2012

Bug 693050 : Fix compiler warnings

--- a/jbig2_halftone.c
+++ b/jbig2_halftone.c
@@ -179,7 +179,7 @@
     }
   }
 
-  hd = jbig2_hd_new(ctx, params, image);
+  if (code == 0) hd = jbig2_hd_new(ctx, params, image);
   jbig2_image_release(ctx, image);
 
   return hd;
@@ -330,7 +330,7 @@
     ws = jbig2_word_stream_buf_new(ctx, data, size);
     if (ws == NULL)
     {
-      code = jbig2_error(ctx, JBIG2_SEVERITY_FATAL, segment->number,
+      jbig2_error(ctx, JBIG2_SEVERITY_FATAL, segment->number,
         "failed to allocate ws in jbig2_decode_gray_scale_image");
       goto cleanup;
     }
@@ -338,7 +338,7 @@
     as = jbig2_arith_new(ctx, ws);
     if (as == NULL)
     {
-      code = jbig2_error(ctx, JBIG2_SEVERITY_FATAL, segment->number,
+      jbig2_error(ctx, JBIG2_SEVERITY_FATAL, segment->number,
         "failed to allocate as in jbig2_decode_gray_scale_image");
       goto cleanup;
     }