From 2b6fb153f1bf9c074fe33015c2cbdbc387b67751 Mon Sep 17 00:00:00 2001 From: Aous Naman Date: Sat, 2 Nov 2024 21:14:40 +1100 Subject: [PATCH] Reduce warnings. --- src/core/coding/ojph_block_decoder.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/core/coding/ojph_block_decoder.cpp b/src/core/coding/ojph_block_decoder.cpp index c5d4d61..cfa8697 100644 --- a/src/core/coding/ojph_block_decoder.cpp +++ b/src/core/coding/ojph_block_decoder.cpp @@ -1814,9 +1814,9 @@ namespace ojph { ui32 width, ui32 height, ui32 stride, bool stripe_causal) { - static bool insufficient_precision = false; - static bool modify_code = false; - static bool truncate_spp_mrp = false; + // static bool insufficient_precision = false; + // static bool modify_code = false; + // static bool truncate_spp_mrp = false; if (num_passes > 1 && lengths2 == 0) { @@ -2045,12 +2045,12 @@ namespace ojph { cond0 = u_q0 > 32; u_ext = (ui16)(cond0 ? (uvlc_entry & 0xF) : 0); vlc_val = rev_advance64(&vlc, cond0 ? 4 : 0); - u_q0 += u_ext << 2; + u_q0 = (ui16)(u_q0 + (u_ext << 2)); sp[1] = u_q0; cond1 = u_q1 > 32; u_ext = (ui16)(cond1 ? (uvlc_entry & 0xF) : 0); vlc_val = rev_advance64(&vlc, cond1 ? 4 : 0); - u_q1 += u_ext << 2; + u_q1 = (ui16)(u_q1 + (u_ext << 2)); sp[3] = u_q1; } sp[0] = sp[1] = 0; @@ -2167,12 +2167,12 @@ namespace ojph { cond0 = u_q0 > 32; u_ext = (ui16)(cond0 ? (uvlc_entry & 0xF) : 0); vlc_val = rev_advance64(&vlc, cond0 ? 4 : 0); - u_q0 += u_ext << 2; + u_q0 = (ui16)(u_q0 + (u_ext << 2)); sp[1] = u_q0; cond1 = u_q1 > 32; u_ext = (ui16)(cond1 ? (uvlc_entry & 0xF) : 0); vlc_val = rev_advance64(&vlc, cond1 ? 4 : 0); - u_q1 += u_ext << 2; + u_q1 = (ui16)(u_q1 + (u_ext << 2)); sp[3] = u_q1; } sp[0] = sp[1] = 0;