Re: [PATCH 03/12] transport-helper: drop const to fix strchr() warnings
- From
Patrick Steinhardt <ps@pks.im>
- Date
- Apr 1, 2026, 13:46 UTC
- Message-ID
- <ac0hyTqMvHriS_yf@pks.im>
- In-Reply-To
- <20260331234148.GC2328529@coredump.intra.peff.net>
On Tue, Mar 31, 2026 at 07:41:48PM -0400, Jeff King wrote:
Show 8 quoted lines
> We implicitly drop the const from our "key" variable when we do: > > char *p = strchr(key, ' '); > > which causes compilation with some C23 versions of libc (notably recent > glibc) to complain. > > We need "p" to remain writable, since we assign NULL over the space we
You probably mean NUL, not NULL.
Patrick