On Sat, Aug 2, 2025 at 9:32 AM Dan Carpenter <dan.carpenter@xxxxxxxxxx> wrote: > On Fri, Aug 01, 2025 at 11:57:43PM +0200, Andy Shevchenko wrote: > > On Fri, Aug 1, 2025 at 6:01 PM Colin Ian King <colin.i.king@xxxxxxxxx> wrote: > > > > > > There are incorrect %u format specifiers being used to for signed integers, > > > fix this by using %d instead. > > > > Both of them sound to me like the fix of the symptom and not the > > cause. Can we simply make types of the iterators to be unsigned > > instead? > > Making iterator unsigned by default only increases the rate of bugs. How? Please, make sure this is relevant to this case. > (Although, my stats might be biased because I'm only looking at bugs I > can detect through static analysis). In general making a variable to be signed that is never negative at bare minimum is illogical. P.S. FWIW, it is a common approach in the media subsystem to require iterators to be unsigned when they are truly unsigned. -- With Best Regards, Andy Shevchenko