From 7202184ee0f6aaf859bb76364e9372453fb53298 Mon Sep 17 00:00:00 2001 From: Carl Woffenden Date: Fri, 3 Apr 2020 11:55:29 +0200 Subject: [PATCH] Fixes decompressor when using -Wshorten-64-to-32 (#2062) Spotted on iOS when building with `-Wshorten-64-to-32` (since `__builtin_expect` returns a `long`). --- lib/decompress/huf_decompress.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/decompress/huf_decompress.c b/lib/decompress/huf_decompress.c index 6cf9c4fdd..a2478b4c7 100644 --- a/lib/decompress/huf_decompress.c +++ b/lib/decompress/huf_decompress.c @@ -835,7 +835,7 @@ HUF_decompress4X2_usingDTable_internal_body( HUF_DECODE_SYMBOLX2_0(op2, &bitD2); HUF_DECODE_SYMBOLX2_0(op3, &bitD3); HUF_DECODE_SYMBOLX2_0(op4, &bitD4); - endSignal = LIKELY( + endSignal = (U32)LIKELY( (BIT_reloadDStreamFast(&bitD1) == BIT_DStream_unfinished) & (BIT_reloadDStreamFast(&bitD2) == BIT_DStream_unfinished) & (BIT_reloadDStreamFast(&bitD3) == BIT_DStream_unfinished) -- 2.47.2