From c4357a9ddc7a22997cf39a30ac22a0e83cd9bd33 Mon Sep 17 00:00:00 2001 From: Thomas Debesse Date: Thu, 11 Jul 2024 01:06:08 +0200 Subject: [PATCH] crnlib: fix CodeQL report cpp/comparison-with-wider-type --- crnlib/crn_comp.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crnlib/crn_comp.cpp b/crnlib/crn_comp.cpp index dd823acd..c12d6946 100644 --- a/crnlib/crn_comp.cpp +++ b/crnlib/crn_comp.cpp @@ -639,7 +639,7 @@ static void remap_color_endpoints(uint16* remapping, const optimize_color_params remaining[i].e = unpacked_endpoints[i]; } crnlib::vector chosen(n << 1); - uint remaining_count = n, chosen_front = n, chosen_back = chosen_front; + uint16 remaining_count = n, chosen_front = n, chosen_back = chosen_front; chosen[chosen_front] = selected; optimize_color_params::unpacked_endpoint front_e = remaining[selected].e, back_e = front_e; bool front_updated = true, back_updated = true;