]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 9.2.0233: Compiler warning in strings.c v9.2.0233
authorHirohito Higashi <h.east.727@gmail.com>
Mon, 23 Mar 2026 18:46:31 +0000 (18:46 +0000)
committerChristian Brabandt <cb@256bit.org>
Mon, 23 Mar 2026 18:46:31 +0000 (18:46 +0000)
Problem:  Compiler warning in strings.c
          (Timothy Rice, after v9.2.0031)
Solution: Return early when str_m is zero
          (Hirohito Higashi)

fixes:  #19795
closes: #19800

Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
src/strings.c
src/version.c

index 37f52fe2485f5239aaffb5d780e267ee91ebeb3b..b47422c1146f78c86d00a06c4bc3e5bfd75a3de1 100644 (file)
@@ -2849,6 +2849,9 @@ vim_snprintf_safelen(char *str, size_t str_m, const char *fmt, ...)
     va_list ap;
     int            str_l;
 
+    if (str_m == 0)
+       return 0;
+
     va_start(ap, fmt);
     str_l = vim_vsnprintf_typval(str, str_m, fmt, ap, NULL);
     va_end(ap);
index a542cb79d6844bf743c7b57a737c98a64d54267b..de8f408dd3e75fb281ce4a9fb79eeccc135165e9 100644 (file)
@@ -734,6 +734,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    233,
 /**/
     232,
 /**/