shithub: jbig2

Download patch

ref: 7fd8021bbe295cf58ac530cee52c8f3b67fde872
parent: 674d8f53697d25624c7677e2eba01804a35fe669
author: Julian Smith <jules@op59.net>
date: Thu Nov 21 13:39:21 EST 2019

Fix some -W -Wall warnings about printf format type mismatches.

--- a/jbig2.c
+++ b/jbig2.c
@@ -381,7 +381,7 @@
                 p += 4;
 
                 segment->data_length = p - s;
-                jbig2_error(ctx, JBIG2_SEVERITY_INFO, segment->number, "unknown length determined to be %u", segment->data_length);
+                jbig2_error(ctx, JBIG2_SEVERITY_INFO, segment->number, "unknown length determined to be %lu", (long) segment->data_length);
             }
             else if (segment->data_length > ctx->buf_wr_ix - ctx->buf_rd_ix)
                     return 0; /* need more data */
--- a/jbig2_segment.c
+++ b/jbig2_segment.c
@@ -334,7 +334,7 @@
 jbig2_parse_segment(Jbig2Ctx *ctx, Jbig2Segment *segment, const uint8_t *segment_data)
 {
     jbig2_error(ctx, JBIG2_SEVERITY_INFO, segment->number,
-                "segment %d, flags=%x, type=%d, data_length=%d", segment->number, segment->flags, segment->flags & 63, segment->data_length);
+                "segment %d, flags=%x, type=%d, data_length=%ld", segment->number, segment->flags, segment->flags & 63, (long) segment->data_length);
     switch (segment->flags & 63) {
     case 0:
         return jbig2_symbol_dictionary(ctx, segment, segment_data);