]> Savannah Git Hosting - gnulib.git/commitdiff
vasnprintf: Fix -Wshadow=local warnings.
authorBruno Haible <bruno@clisp.org>
Sat, 26 Apr 2025 08:49:38 +0000 (10:49 +0200)
committerBruno Haible <bruno@clisp.org>
Sat, 26 Apr 2025 08:50:25 +0000 (10:50 +0200)
* lib/vasnprintf.c (VASNPRINTF): Rename local variable 'i' to 'di'.

ChangeLog
lib/vasnprintf.c

index b7ab0df56b9fdfef75c823ad16c4d71ca2eef537..1e7d87b8ad3f0f6b48963bb17c4859aac48d8a79 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2025-04-26  Bruno Haible  <bruno@clisp.org>
+
+       vasnprintf: Fix -Wshadow=local warnings.
+       * lib/vasnprintf.c (VASNPRINTF): Rename local variable 'i' to 'di'.
+
 2025-04-26  Bruno Haible  <bruno@clisp.org>
 
        Silence gcc 15 -Wunterminated-string-initialization warnings.
index f1bfcf31616764531fabfd508b29dadd15b48aab..a5a956603a0fa7f967fe152ee494276161b7f7a2 100644 (file)
@@ -2517,7 +2517,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
     TCHAR_T *buf;
     TCHAR_T *buf_malloced;
     const FCHAR_T *cp;
-    size_t i;
+    size_t di;
     DIRECTIVE *dp;
     /* Output string accumulator.  */
     DCHAR_T *result;
@@ -2581,7 +2581,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
 #define ENSURE_ALLOCATION(needed) \
   ENSURE_ALLOCATION_ELSE((needed), goto out_of_memory; )
 
-    for (cp = format, i = 0, dp = &d.dir[0]; ; cp = dp->dir_end, i++, dp++)
+    for (cp = format, di = 0, dp = &d.dir[0]; ; cp = dp->dir_end, di++, dp++)
       {
         if (cp != dp->dir_start)
           {
@@ -2604,7 +2604,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
                 while (--n > 0);
               }
           }
-        if (i == d.count)
+        if (di == d.count)
           break;
 
         /* Execute a single directive.  */