]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 9.1.2147: Compile warning in strings.c v9.1.2147
authorJohn Marriott <basilisk@internode.on.net>
Fri, 13 Feb 2026 07:45:29 +0000 (08:45 +0100)
committerChristian Brabandt <cb@256bit.org>
Fri, 13 Feb 2026 07:45:29 +0000 (08:45 +0100)
Problem:  Compile warning in strings.c
Solution: Use const qualifier (John Marriott).

closes: #19387

Signed-off-by: John Marriott <basilisk@internode.on.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
runtime/doc/version9.txt
src/strings.c
src/version.c

index 87a702cfec8e4a4d380f796d5a4d281416f657ee..a1dfbc9d92aaebf456bb4b6e012a0683577d712e 100644 (file)
@@ -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
index f4b335676f3a97eab17d869068fd5dde009ebdd9..f2176f1c436e09b58fef4752bc40dcf1c6237593 100644 (file)
@@ -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, '\0',
+                       const char *q = memchr(str_arg, '\0',
                                  precision <= (size_t)0x7fffffffL ? precision
                                                       : (size_t)0x7fffffffL);
 
index 963161df4f5a70705368aaff790e8276533b2271..b521788dd145c7dbf1e0a2ad468bc3599b12703a 100644 (file)
@@ -734,6 +734,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    2147,
 /**/
     2146,
 /**/