Re: [PATCH v2] utf8: use size_t for string width methods and callee sites.
"Hardik Kumar" <[email protected]>
| Newsgroups | org.kernel.vger.git |
|---|---|
| Message-ID | <[email protected]> |
On Mon Jul 27, 2026 at 9:32 AM IST, Junio C Hamano wrote: > Junio C Hamano <[email protected]> writes: > > Quite honestly, I have to say that this topic has a very low > expected benefit in practice, while it costs us quite a lot by > having to carefully code and even more carefully review. If we have > to endure so many new bugs in the callers just to clear an existing > TODO, we might be better off not doing so and relying on the "safe > cast from size_t down to int that barfs if the quantity does not fit > in an int" protection. I agree that while this might not net something significant and yes going through this is difficult but, many places it would much rather make sense having an unsigned int as mostly its rare that we would be dealing with negatives except in a few cases which you highlighted before and others I got when reworking. I would like to send up a patch with some better changes done. I had previously not built and tested with warnings enabled apologies for that I assumed the defaults to enable them without explicit args. Thanks, Hardik