mirror of
https://github.com/freebsd/freebsd-src.git
synced 2026-10-28 11:25:21 +01:00
m4: Const correctness for C23
On some platforms, e.g. Linux Clang 22.1.8 / glibc 2.43, strchr() now implements the C23 behaviour where passing a const pointer to strchr() also returns a const pointer. This breaks m4 during the bootstrap build, since it assumes the return value is always a mutable pointer. Since the returned value is never modified, simply make the temporary const. MFC after: 1 week Reviewed by: bapt, dim Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D58494
This commit is contained in:
1 parent
9fd8f5e761
commit
1d94e2e0f2
1 file changed
+1
-1
+1
-1
@@ -70,7 +70,7 @@ unsigned char *endpbb; /* end of push-back buffer */
|
||||
ptrdiff_t
|
||||
doindex(const char *s1, const char *s2)
|
||||
{
|
||||
char *t;
|
||||
const char *t;
|
||||
|
||||
t = strstr(s1, s2);
|
||||
if (t == NULL)
|
||||
|
||||
Reference in new issue
Block a user