From 115a7bab0f1dffe6ada32a814618952c635008ea Mon Sep 17 00:00:00 2001 From: Přemysl Eric Janouch Date: Wed, 13 Mar 2024 18:46:20 +0100 Subject: Fix a build issue, and a big endian conversion --- fiv-io.c | 8 +++++--- meson.build | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/fiv-io.c b/fiv-io.c index 485a91a..a405c93 100644 --- a/fiv-io.c +++ b/fiv-io.c @@ -1538,9 +1538,11 @@ load_libwebp_frame(WebPAnimDecoder *dec, const WebPAnimInfo *info, if (G_BYTE_ORDER == G_LITTLE_ENDIAN) { memcpy(dst, buf, area * sizeof *dst); } else { - uint32_t *src = (uint32_t *) buf; - for (uint64_t i = 0; i < area; i++) - *dst++ = GUINT32_FROM_LE(*src++); + const uint32_t *src = (const uint32_t *) buf; + for (uint64_t i = 0; i < area; i++) { + uint32_t value = *src++; + *dst++ = GUINT32_FROM_LE(value); + } } // info->bgcolor is not reliable. diff --git a/meson.build b/meson.build index a8fc947..82e7978 100644 --- a/meson.build +++ b/meson.build @@ -166,7 +166,7 @@ tiff_tables = custom_target('tiff-tables.h', desktops = ['fiv.desktop', 'fiv-browse.desktop'] iolib = static_library('fiv-io', 'fiv-io.c', 'fiv-io-cmm.c', 'xdg.c', - tiff_tables, + tiff_tables, config, dependencies : dependencies).extract_all_objects(recursive : true) exe = executable('fiv', 'fiv.c', 'fiv-view.c', 'fiv-context-menu.c', 'fiv-browser.c', 'fiv-sidebar.c', 'fiv-thumbnail.c', 'fiv-collection.c', -- cgit v1.2.3-70-g09d2