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 924bf0c52762f2b0fd68dbe2f001ddb298902c9b
Author: Kim Woelders <k...@woelders.dk>
AuthorDate: Sun Jun 18 07:11:10 2023 +0200

    Loaders: Static constify some data that may as well be
---
 src/modules/loaders/loader_qoi.c | 4 ++--
 src/modules/loaders/loader_y4m.c | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/modules/loaders/loader_qoi.c b/src/modules/loaders/loader_qoi.c
index 81a97cb..f9e4ef7 100644
--- a/src/modules/loaders/loader_qoi.c
+++ b/src/modules/loaders/loader_qoi.c
@@ -49,7 +49,7 @@ QOIDEC_API QoiDecStatus qoi_dec(QoiDecCtx * ctx);
 QOIDEC_API          QoiDecStatus
 qoi_dec_init(QoiDecCtx * ctx, const void *buffer, ptrdiff_t size)
 {
-   uint8_t             magic[4] = "qoif";
+   static const uint8_t magic[4] = "qoif";
 
    QOIDEC_ASSERT(size >= 0);
 
@@ -98,7 +98,7 @@ qoi_dec(QoiDecCtx * ctx)
    Clr                 t[64] = { 0 };
    Clr                 l = {.a = 0xFF };
    uint8_t             lop = -1;
-   uint8_t             eof[8] = {[7] = 0x1 };
+   static const uint8_t eof[8] = {[7] = 0x1 };
    const uint8_t      *p = ctx->p, *end = ctx->end;
 
    QOIDEC_ASSERT(ctx->data != NULL);
diff --git a/src/modules/loaders/loader_y4m.c b/src/modules/loaders/loader_y4m.c
index b819895..9637e79 100644
--- a/src/modules/loaders/loader_y4m.c
+++ b/src/modules/loaders/loader_y4m.c
@@ -23,10 +23,10 @@ static const char  *const _formats[] = { "y4m" };
 static int
 _load(ImlibImage * im, int load_data)
 {
+   static const uint8_t magic[10] = "YUV4MPEG2 ";
    int                 rc = LOAD_FAIL;
    int                 broken_image = 0;
    uint32_t           *ptr = NULL;
-   const uint8_t       magic[10] = "YUV4MPEG2 ";
 
    /* we do not support the file being loaded from memory */
    if (!im->fi->fp)

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

Reply via email to