shithub: jbig2

Download patch

ref: e360e8f2d17405cd733a62d11d8451b236ebdc56
parent: e69f9a2ac600685eeda9aa628d631e4eab8c86aa
author: Sebastian Rasmussen <[email protected]>
date: Sat Mar 21 12:20:28 EDT 2020

jbig2dec: Fix two overlooked warnings.

While working to fix all warnings seen when -Wsign-conversion is
enabled, these two warnings were accidentally introduced by commit
ff53af0d4ff9291aa5039522f5553a2850dd569d and not noticed in the
avalanche of warnings emitted due to -Wsign-conversion. This commit
changes the indicies to the type of the limit variable, fixing the
warnings.

--- a/jbig2_page.c
+++ b/jbig2_page.c
@@ -319,7 +319,7 @@
 Jbig2Image *
 jbig2_page_out(Jbig2Ctx *ctx)
 {
-    int index;
+    uint32_t index;
 
     /* search for a completed page */
     for (index = 0; index < ctx->max_page_index; index++) {
@@ -348,7 +348,7 @@
 void
 jbig2_release_page(Jbig2Ctx *ctx, Jbig2Image *image)
 {
-    int index;
+    uint32_t index;
 
     if (image == NULL)
         return;