Re: [PATCH 3/5] reftable/stack: fix compiler warning due to missing braces
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Aug 4, 2025, 19:14 UTC
- Message-ID
- <xmqqwm7i527l.fsf@gitster.g>
- In-Reply-To
- <aJBNHzE3RQBZZTcU@pks.im>
Patrick Steinhardt <ps@pks.im> writes:
Show 5 quoted lines
> Yeah, in general I'm also of the opinion that we shouldn't bother. But > in libgit2 we have pipelines that use such older compilers, and we don't > want to drop those for now. So I think we should treat the reftable > library specially, doubly so as this is the only instance that causes > problems.
Hmph. Shouldn't there be some kind of "shim" layer where these things are defined per project convention and/or toolchain being used? So when building for git proper, you'd use {0} just as everybody else do, but for others your include file supplied by that project would use something else (like {{0}} in this case)? That kind of approach would be a better solution than open coding QSORT() in the longer term, for example.