shithub: jbig2

Download patch

ref: 48ba3a7c989a61e4b597636eeee9098f2eed8e11
parent: cc7ef4a1ef58b01a1548fd988e3eaf344a7f472d
author: Robin Watts <robin.watts@artifex.com>
date: Mon Jan 4 09:04:00 EST 2016

Squash Warnings: JBig2

ifdef out some used code.

Make some functions static that should be.

--- a/jbig2_generic.c
+++ b/jbig2_generic.c
@@ -392,6 +392,7 @@
   return 0;
 }
 
+#ifdef UNUSED
 static int
 jbig2_decode_generic_template3(Jbig2Ctx *ctx,
 			       Jbig2Segment *segment,
@@ -457,6 +458,7 @@
 
   return 0;
 }
+#endif
 
 static int
 jbig2_decode_generic_template3_unopt(Jbig2Ctx *ctx,
--- a/jbig2_image.c
+++ b/jbig2_image.c
@@ -138,9 +138,10 @@
 
 /* composite one jbig2_image onto another
    slow but general version */
-int jbig2_image_compose_unopt(Jbig2Ctx *ctx,
-			Jbig2Image *dst, Jbig2Image *src,
-                        int x, int y, Jbig2ComposeOp op)
+static int
+jbig2_image_compose_unopt(Jbig2Ctx *ctx,
+                          Jbig2Image *dst, Jbig2Image *src,
+                          int x, int y, Jbig2ComposeOp op)
 {
     int i, j;
     int sw = src->width;
--- a/jbig2_refinement.c
+++ b/jbig2_refinement.c
@@ -403,7 +403,7 @@
  * Find the first referred-to intermediate region segment
  * with a non-NULL result for use as a reference image
  */
-Jbig2Segment *
+static Jbig2Segment *
 jbig2_region_find_referred(Jbig2Ctx *ctx,Jbig2Segment *segment)
 {
   const int nsegments = segment->referred_to_segment_count;
--- a/jbig2_segment.c
+++ b/jbig2_segment.c
@@ -218,8 +218,9 @@
 }
 
 /* dispatch code for extension segment parsing */
-int jbig2_parse_extension_segment(Jbig2Ctx *ctx, Jbig2Segment *segment,
-                            const uint8_t *segment_data)
+static int
+jbig2_parse_extension_segment(Jbig2Ctx *ctx, Jbig2Segment *segment,
+                              const uint8_t *segment_data)
 {
     uint32_t type = jbig2_get_uint32(segment_data);
     bool reserved = type & 0x20000000;