From f7285ff4056d03582691a2cc2855f460b29a2d47 Mon Sep 17 00:00:00 2001 From: pstef <3462925+pstef@users.noreply.github.com> Date: Wed, 19 Mar 2025 20:09:15 +0000 Subject: [PATCH] Silence warning: left shift of negative value Import the change from upstream 16c83cd5fc4c18954c1b6e3de16c37ba --- libretro-common/formats/jpeg/rjpeg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libretro-common/formats/jpeg/rjpeg.c b/libretro-common/formats/jpeg/rjpeg.c index 71f526ca3f..0dc39625bb 100644 --- a/libretro-common/formats/jpeg/rjpeg.c +++ b/libretro-common/formats/jpeg/rjpeg.c @@ -330,7 +330,7 @@ static void rjpeg_build_fast_ac(int16_t *fast_ac, rjpeg_huffman *h) int k = ((i << len) & ((1 << FAST_BITS) - 1)) >> (FAST_BITS - magbits); int m = 1 << (magbits - 1); if (k < m) - k += (-1 << magbits) + 1; + k += (~0U << magbits) + 1; /* if the result is small enough, we can fit it in fast_ac table */ if (k >= -128 && k <= 127)