summaryrefslogtreecommitdiff
path: root/jbig2dec/jbig2_halftone.c
diff options
context:
space:
mode:
authorSebastian Rasmussen <sebras@gmail.com>2018-09-20 20:24:47 +0800
committerSebastian Rasmussen <sebras@gmail.com>2018-10-30 15:51:09 +0100
commit53163da329e2019e27a8876f6b2363628de2ae0f (patch)
tree7249d9b65d6c77c76f803f1a70a1a3a10909d270 /jbig2dec/jbig2_halftone.c
parentecb88d9bd6f6cc1ea8b4dee9f2df50da04429135 (diff)
downloadghostpdl-53163da329e2019e27a8876f6b2363628de2ae0f.tar.gz
jbig2dec: Fix signed/unsigned mismatches.
Diffstat (limited to 'jbig2dec/jbig2_halftone.c')
-rw-r--r--jbig2dec/jbig2_halftone.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/jbig2dec/jbig2_halftone.c b/jbig2dec/jbig2_halftone.c
index 5eeaab453..e8260779c 100644
--- a/jbig2dec/jbig2_halftone.c
+++ b/jbig2dec/jbig2_halftone.c
@@ -47,7 +47,7 @@ jbig2_hd_new(Jbig2Ctx *ctx, const Jbig2PatternDictParams *params, Jbig2Image *im
const uint32_t HPW = params->HDPW;
const uint32_t HPH = params->HDPH;
int code;
- int i;
+ uint32_t i;
int j;
/* allocate a new struct */
@@ -76,7 +76,7 @@ jbig2_hd_new(Jbig2Ctx *ctx, const Jbig2PatternDictParams *params, Jbig2Image *im
/* compose with the REPLACE operator; the source
will be clipped to the destination, selecting the
proper sub image */
- code = jbig2_image_compose(ctx, new->patterns[i], image, -i * HPW, 0, JBIG2_COMPOSE_REPLACE);
+ code = jbig2_image_compose(ctx, new->patterns[i], image, -i * (int32_t) HPW, 0, JBIG2_COMPOSE_REPLACE);
if (code < 0) {
jbig2_error(ctx, JBIG2_SEVERITY_WARNING, -1, "failed to compose image into collective bitmap dictionary");
for (j = 0; j < i; j++)
@@ -458,7 +458,7 @@ jbig2_decode_halftone_region(Jbig2Ctx *ctx, Jbig2Segment *segment,
Jbig2Image *HSKIP = NULL;
Jbig2PatternDict *HPATS;
uint32_t i;
- int32_t mg, ng;
+ uint32_t mg, ng;
int32_t x, y;
uint16_t gray_val;
int code = 0;