Skip to content

Commit 388654a

Browse files
John Marriottchrisbra
authored andcommitted
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]>
1 parent 9bf9d43 commit 388654a

3 files changed

Lines changed: 10 additions & 4 deletions

File tree

runtime/doc/version9.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*version9.txt* For Vim version 9.1. Last change: 2026 Feb 12
1+
*version9.txt* For Vim version 9.1. Last change: 2026 Feb 13
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -52557,4 +52557,8 @@ Patch 9.1.2146
5255752557
Problem: filetype: cel files are not recognized
5255852558
Solution: Detect *.cel files as cel filetype (Stefan VanBuren).
5255952559

52560+
Patch 9.1.2147
52561+
Problem: Compile warning in strings.c
52562+
Solution: Use const qualifier (John Marriott).
52563+
5256052564
vim:tw=78:ts=8:noet:ft=help:norl:fdm=manual:nofoldenable

src/strings.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3156,7 +3156,7 @@ parse_fmt_types(
31563156
{
31573157
if (*p != '%')
31583158
{
3159-
char *q = strchr(p + 1, '%');
3159+
const char *q = strchr(p + 1, '%');
31603160
size_t n = (q == NULL) ? STRLEN(p) : (size_t)(q - p);
31613161

31623162
p += n;
@@ -3557,7 +3557,7 @@ vim_vsnprintf_typval(
35573557
{
35583558
if (*p != '%')
35593559
{
3560-
char *q = strchr(p + 1, '%');
3560+
const char *q = strchr(p + 1, '%');
35613561
size_t n = (q == NULL) ? STRLEN(p) : (size_t)(q - p);
35623562

35633563
// Copy up to the next '%' or NUL without any changes.
@@ -3885,7 +3885,7 @@ vim_vsnprintf_typval(
38853885
else
38863886
{
38873887
// memchr on HP does not like n > 2^31 !!!
3888-
char *q = memchr(str_arg, '\0',
3888+
const char *q = memchr(str_arg, '\0',
38893889
precision <= (size_t)0x7fffffffL ? precision
38903890
: (size_t)0x7fffffffL);
38913891

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -734,6 +734,8 @@ static char *(features[]) =
734734

735735
static int included_patches[] =
736736
{ /* Add new patch number below this line */
737+
/**/
738+
2147,
737739
/**/
738740
2146,
739741
/**/

0 commit comments

Comments
 (0)