This is an automated email from the git hooks/post-receive script.

git pushed a commit to branch master
in repository legacy-imlib2.

View the commit online.

commit 1e5040e8e7fdbbe811e822357df3616bea445007
Author: Kim Woelders <k...@woelders.dk>
AuthorDate: Sun Sep 3 11:32:10 2023 +0200

    loaders: Fix build with -m32 --enable-debug
---
 src/modules/loaders/loader_ani.c  |  2 +-
 src/modules/loaders/loader_j2k.c  |  6 +++---
 src/modules/loaders/loader_jpeg.c |  3 ++-
 src/modules/loaders/loader_jxl.c  | 11 ++++++-----
 src/modules/loaders/loader_png.c  |  4 ++--
 src/modules/loaders/loader_tiff.c |  6 +++---
 6 files changed, 17 insertions(+), 15 deletions(-)

diff --git a/src/modules/loaders/loader_ani.c b/src/modules/loaders/loader_ani.c
index cd38236..d66cd5e 100644
--- a/src/modules/loaders/loader_ani.c
+++ b/src/modules/loaders/loader_ani.c
@@ -88,7 +88,7 @@ _load_embedded(ImlibImage * im, int load_data, const char *data,
    return rc;
 }
 
-#define OFFS(p) ((const char*)(p) - (const char*)im->fi->fdata)
+#define OFFS(p) (long)((const char*)(p) - (const char*)im->fi->fdata)
 
 static int
 _riff_parse(ImlibImage * im, riff_ctx_t * ctx, const char *fdata,
diff --git a/src/modules/loaders/loader_j2k.c b/src/modules/loaders/loader_j2k.c
index 65958f7..a2b60c3 100644
--- a/src/modules/loaders/loader_j2k.c
+++ b/src/modules/loaders/loader_j2k.c
@@ -53,7 +53,7 @@ mm_init(const void *src, unsigned int size)
 static              OPJ_SIZE_T
 mm_read(void *dst, OPJ_SIZE_T len, void *data)
 {
-   DL("%s: len=%ld\n", __func__, len);
+   DL("%s: len=%ld\n", __func__, (long)len);
 
    if (mdata.dptr >= mdata.data + mdata.size)
       return -1;                /* Out of data */
@@ -69,7 +69,7 @@ mm_read(void *dst, OPJ_SIZE_T len, void *data)
 static              OPJ_OFF_T
 mm_seek_cur(OPJ_OFF_T offs, void *data)
 {
-   DL("%s: offs=%ld\n", __func__, offs);
+   DL("%s: offs=%ld\n", __func__, (long)offs);
 
    if (mdata.dptr + offs > mdata.data + mdata.size)
       return 0;                 /* Out of data */
@@ -82,7 +82,7 @@ mm_seek_cur(OPJ_OFF_T offs, void *data)
 static              OPJ_BOOL
 mm_seek_set(OPJ_OFF_T offs, void *data)
 {
-   DL("%s: offs=%ld\n", __func__, offs);
+   DL("%s: offs=%ld\n", __func__, (long)offs);
 
    if (offs > mdata.size)
       return OPJ_FALSE;         /* Out of data */
diff --git a/src/modules/loaders/loader_jpeg.c b/src/modules/loaders/loader_jpeg.c
index 42015a4..44e8cc6 100644
--- a/src/modules/loaders/loader_jpeg.c
+++ b/src/modules/loaders/loader_jpeg.c
@@ -191,7 +191,8 @@ _load(ImlibImage * im, int load_data)
                   break;
                }
              DL("l,s,y=%d,%d, %d - x,y=%4ld,%4ld\n", l, y, l + y,
-                (imdata - im->data) % im->w, (imdata - im->data) / im->w);
+                (long)((imdata - im->data) % im->w),
+                (long)((imdata - im->data) / im->w));
 
              switch (jds.out_color_space)
                {
diff --git a/src/modules/loaders/loader_jxl.c b/src/modules/loaders/loader_jxl.c
index 8541b14..c459d69 100644
--- a/src/modules/loaders/loader_jxl.c
+++ b/src/modules/loaders/loader_jxl.c
@@ -22,7 +22,8 @@ _scanline_cb(void *opaque, size_t x, size_t y,
    uint32_t           *imdata;
    size_t              i;
 
-   DL("%s: x,y=%ld,%ld len=%lu\n", __func__, x, y, num_pixels);
+   DL("%s: x,y=%ld,%ld len=%lu\n", __func__,
+      (long)x, (long)y, (long)num_pixels);
 
    imdata = im->data + (im->w * y) + x;
 
@@ -52,7 +53,7 @@ _load(ImlibImage * im, int load_data)
    ImlibImageFrame    *pf;
 
 #if MAX_RUNNERS > 0
-   size_t              n_runners;
+   unsigned int        n_runners;
    JxlParallelRunner  *runner = NULL;
 #endif
 
@@ -80,7 +81,7 @@ _load(ImlibImage * im, int load_data)
    n_runners = JxlThreadParallelRunnerDefaultNumWorkerThreads();
    if (n_runners > MAX_RUNNERS)
       n_runners = MAX_RUNNERS;
-   D("n_runners = %ld\n", n_runners);
+   D("n_runners = %d\n", n_runners);
    runner = JxlThreadParallelRunnerCreate(NULL, n_runners);
    if (!runner)
       goto quit;
@@ -235,7 +236,7 @@ _save(ImlibImage * im)
    size_t              buf_len, i, npix;
 
 #if MAX_RUNNERS > 0
-   size_t              n_runners;
+   unsigned int        n_runners;
    JxlParallelRunner  *runner = NULL;
 #endif
 
@@ -249,7 +250,7 @@ _save(ImlibImage * im)
    n_runners = JxlThreadParallelRunnerDefaultNumWorkerThreads();
    if (n_runners > MAX_RUNNERS)
       n_runners = MAX_RUNNERS;
-   D("n_runners = %ld\n", n_runners);
+   D("n_runners = %d\n", n_runners);
    runner = JxlThreadParallelRunnerCreate(NULL, n_runners);
    if (!runner)
       goto quit;
diff --git a/src/modules/loaders/loader_png.c b/src/modules/loaders/loader_png.c
index 8506295..a2901ac 100644
--- a/src/modules/loaders/loader_png.c
+++ b/src/modules/loaders/loader_png.c
@@ -348,7 +348,7 @@ _load(ImlibImage * im, int load_data)
 
         len = htonl(chunk->hdr.len);
         D("Scan %3d: %06lx: %6d: %.4s: ", ic++,
-          fptr - (unsigned char *)im->fi->fdata, len, chunk->hdr.name);
+          (long)(fptr - (unsigned char *)im->fi->fdata), len, chunk->hdr.name);
         if (!mm_check(fptr + len))
            break;
 
@@ -440,7 +440,7 @@ _load(ImlibImage * im, int load_data)
 
         len = htonl(chunk->hdr.len);
         D("Chunk %3d: %06lx: %6d: %.4s: ", ic++,
-          fptr - (unsigned char *)im->fi->fdata, len, chunk->hdr.name);
+          (long)(fptr - (unsigned char *)im->fi->fdata), len, chunk->hdr.name);
         if (!mm_check(fptr + len))
            break;
 
diff --git a/src/modules/loaders/loader_tiff.c b/src/modules/loaders/loader_tiff.c
index 4548a6a..219b200 100644
--- a/src/modules/loaders/loader_tiff.c
+++ b/src/modules/loaders/loader_tiff.c
@@ -25,7 +25,7 @@ mm_init(const void *src, unsigned int size)
 static              tmsize_t
 _tiff_read(thandle_t ctx, void *buf, tmsize_t len)
 {
-   DD("%s: len=%ld\n", __func__, len);
+   DD("%s: len=%ld\n", __func__, (long)len);
 
    if (mdata.dptr + len > mdata.data + mdata.size)
       return 0;                 /* Out of data */
@@ -39,7 +39,7 @@ _tiff_read(thandle_t ctx, void *buf, tmsize_t len)
 static              tmsize_t
 _tiff_write(thandle_t ctx, void *buf, tmsize_t len)
 {
-   DD("%s: len=%ld\n", __func__, len);
+   DD("%s: len=%ld\n", __func__, (long)len);
 
    return 0;
 }
@@ -49,7 +49,7 @@ _tiff_seek(thandle_t ctx, toff_t offs, int whence)
 {
    const unsigned char *dptr;
 
-   DD("%s: offs=%ld, whence=%d\n", __func__, offs, whence);
+   DD("%s: offs=%ld, whence=%d\n", __func__, (long)offs, whence);
 
    switch (whence)
      {

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.

Reply via email to