patch 9.1.2147: Compile warning in strings.c
Commit:
https://github.com/vim/vim/commit/388654af27a6e422172d6ee6c40b061f5dd6dfa0
Author: John Marriott <[email protected]>
Date: Fri Feb 13 08:45:29 2026 +0100
patch 9.1.2147: Compile warning in strings.c
Problem: Compile warning in strings.c
Solution: Use const qualifier (John Marriott).
closes: #19387
Signed-off-by: John Marriott <[email protected]>
Signed-off-by: Christian Brabandt <[email protected]>
diff --git a/runtime/doc/version9.txt b/runtime/doc/version9.txt
index 87a702cfe..a1dfbc9d9 100644
--- a/runtime/doc/version9.txt
+++ b/runtime/doc/version9.txt
@@ -1,4 +1,4 @@
-*version9.txt* For Vim version 9.1. Last change: 2026 Feb 12
+*version9.txt* For Vim version 9.1. Last change: 2026 Feb 13
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -52557,4 +52557,8 @@ Patch 9.1.2146
Problem: filetype: cel files are not recognized
Solution: Detect *.cel files as cel filetype (Stefan VanBuren).
+Patch 9.1.2147
+Problem: Compile warning in strings.c
+Solution: Use const qualifier (John Marriott).
+
vim:tw=78:ts=8:noet:ft=help:norl:fdm=manual:nofoldenable
diff --git a/src/strings.c b/src/strings.c
index f4b335676..f2176f1c4 100644
--- a/src/strings.c
+++ b/src/strings.c
@@ -3156,7 +3156,7 @@ parse_fmt_types(
{
if (*p != '%')
{
- char *q = strchr(p + 1, '%');
+ const char *q = strchr(p + 1, '%');
size_t n = (q == NULL) ? STRLEN(p) : (size_t)(q - p);
p += n;
@@ -3557,7 +3557,7 @@ vim_vsnprintf_typval(
{
if (*p != '%')
{
- char *q = strchr(p + 1, '%');
+ const char *q = strchr(p + 1, '%');
size_t n = (q == NULL) ? STRLEN(p) : (size_t)(q - p);
// Copy up to the next '%' or NUL without any changes.
@@ -3885,7 +3885,7 @@ vim_vsnprintf_typval(
else
{
// memchr on HP does not like n > 2^31 !!!
- char *q = memchr(str_arg, '
+ const char *q = memchr(str_arg, '
precision <= (size_t)0x7fffffffL ? precision
: (size_t)0x7fffffffL);
diff --git a/src/version.c b/src/version.c
index 963161df4..b521788dd 100644
--- a/src/version.c
+++ b/src/version.c
@@ -734,6 +734,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 2147,
/**/
2146,
/**/
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion visit
https://groups.google.com/d/msgid/vim_dev/E1vqo5s-009iFu-Od%40256bit.org.