From: Jeff King Date: Fri, 27 Dec 2024 14:36:08 GMT Subject: Re: [PATCH 1/9] prio-queue: fix type of `insertion_ctr` Message-ID: <20241227143608.GC88306@coredump.intra.peff.net> In-Reply-To: <20241227-b4-pks-commit-reach-sign-compare-v1-1-07c59c2aa632@pks.im> On Fri, Dec 27, 2024 at 11:46:21AM +0100, Patrick Steinhardt wrote: > In 62e745ced2 (prio-queue: use size_t rather than int for size, > 2024-12-20), we have converted `struct prio_queue` to use `size_t` to > track the number of entries in the queue as well as the allocated size > of the underlying array. There is one more counter though, namely the > insertion counter, that is still using an `unsigned` instead of a > `size_t`. This is unlikely to ever be a problem, but it makes one wonder > why some indices use `size_t` while others use `unsigned`. Furthermore, > the mentioned commit stated the intent to also adapt these variables, > but seemingly forgot to do so. > > Fix the issue by converting those counters to use `size_t`, as well. Yep, this looks good, and was what I meant to send in 62e745ced2. -Peff