shithub: jbig2

Download patch

ref: e2a295a921ad73b46c69bc33c67d8717b94d9b4e
parent: 639e20afb817afd493b3802643f3dcf363962fce
author: giles <giles@ded80894-8fb9-0310-811b-c03f3676ab4d>
date: Thu Oct 25 18:13:42 EDT 2007

Remove some gcc warnings.


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

--- a/jbig2_generic.c
+++ b/jbig2_generic.c
@@ -37,6 +37,7 @@
 
 #include "jbig2.h"
 #include "jbig2_priv.h"
+#include "jbig2_image.h"
 #include "jbig2_arith.h"
 #include "jbig2_generic.h"
 #include "jbig2_mmr.h"
--- a/jbig2_image.h
+++ b/jbig2_image.h
@@ -20,9 +20,14 @@
 #ifndef _JBIG2_IMAGE_H
 #define _JBIG2_IMAGE_H
 
+int jbig2_image_get_pixel(Jbig2Image *image, int x, int y);
+int jbig2_image_set_pixel(Jbig2Image *image, int x, int y, int value);
+
 /* routines for dumping the image data in various formats */
 /* FIXME: should these be in the client instead? */
 
+#include <stdio.h>
+
 int jbig2_image_write_pbm_file(Jbig2Image *image, char *filename);
 int jbig2_image_write_pbm(Jbig2Image *image, FILE *out);
 Jbig2Image *jbig2_image_read_pbm_file(Jbig2Ctx *ctx, char *filename);
@@ -32,9 +37,5 @@
 int jbig2_image_write_png_file(Jbig2Image *image, char *filename);
 int jbig2_image_write_png(Jbig2Image *image, FILE *out);
 #endif
-
-int jbig2_image_get_pixel(Jbig2Image *image, int x, int y);
-int jbig2_image_set_pixel(Jbig2Image *image, int x, int y, int value);
-
 
 #endif /* _JBIG2_IMAGE_H */
--- a/jbig2_page.c
+++ b/jbig2_page.c
@@ -243,7 +243,6 @@
 {
     /* grow the page to accomodate a new stripe if necessary */
     if (page->striped) {
-	int old_height = page->image->height;
 	int new_height = y + image->height + page->end_row;
 	if (page->image->height < new_height) {
 	    jbig2_error(ctx, JBIG2_SEVERITY_DEBUG, -1,
--- a/jbig2_refinement.c
+++ b/jbig2_refinement.c
@@ -169,7 +169,6 @@
   const int GRH = image->height;
   const int stride = image->stride;
   const int refstride = params->reference->stride;
-  const int dx = params->DX;
   const int dy = params->DY;
   byte *grreg_line = (byte *)image->data;
   byte *grref_line = (byte *)params->reference->data;
--- a/jbig2_symbol_dict.c
+++ b/jbig2_symbol_dict.c
@@ -456,7 +456,7 @@
 		      return NULL;
 		  } else {
 		      /* 6.5.8.2.2 */
-		      bool SBHUFF = params->SDHUFF;
+		      /* bool SBHUFF = params->SDHUFF; */
 		      Jbig2RefinementRegionParams rparams;
 		      Jbig2Image *image;
 		      uint32_t ID;
--- a/jbig2_text.c
+++ b/jbig2_text.c
@@ -76,7 +76,7 @@
     Jbig2Image *IB;
     Jbig2WordStream *ws = NULL;
     Jbig2HuffmanState *hs = NULL;
-    Jbig2HuffmanTable *SBSYMCODES;
+    Jbig2HuffmanTable *SBSYMCODES = NULL;
     Jbig2ArithState *as = NULL;
     Jbig2ArithIntCtx *IADT = NULL;
     Jbig2ArithIntCtx *IAFS = NULL;