]> git.ipfire.org Git - thirdparty/gnulib.git/commitdiff
mbrtowc, mbrtoc32: Silence -Wshadow warnings (regr. 2026-04-02).
authorBruno Haible <bruno@clisp.org>
Mon, 6 Apr 2026 11:21:56 +0000 (13:21 +0200)
committerBruno Haible <bruno@clisp.org>
Mon, 6 Apr 2026 11:21:56 +0000 (13:21 +0200)
Reported by Collin Funk.

* lib/mbrtowc.c (rpl_mbrtowc): Enclose the #include in a block.
* lib/mbrtoc32.c (mbrtoc32): Likewise.

ChangeLog
lib/mbrtoc32.c
lib/mbrtowc.c

index 0decc21186ba3484e2efd4c6b0050f3fde9ac41c..6701cd723f8910ca7c070c9a311ffad0b2ca2b63 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2026-04-06  Bruno Haible  <bruno@clisp.org>
+
+       mbrtowc, mbrtoc32: Silence -Wshadow warnings (regr. 2026-04-02).
+       Reported by Collin Funk.
+       * lib/mbrtowc.c (rpl_mbrtowc): Enclose the #include in a block.
+       * lib/mbrtoc32.c (mbrtoc32): Likewise.
+
 2026-04-05  Paul Eggert  <eggert@cs.ucla.edu>
 
        term-style-control: use pthread_sigmask
index 855902a454069f3a867f9e67d01703fbccef09b0..7d691b8b2ff8fa94ce1949410efe96b425b13324 100644 (file)
@@ -209,9 +209,10 @@ mbrtoc32 (char32_t *pwc, const char *s, size_t n, mbstate_t *ps)
       /* Here m > 0.  */
 
       int res;
-
+      {
 #  define FITS_IN_CHAR_TYPE(wc)  1
 #  include "mbrtowc-impl-utf8.h"
+      }
 
      success:
       /* res >= 0 is the corrected return value of
index 064433163efc8cfca3c02efcba3c7006cc786af4..59320cd51cd55c50635a8586c6255ed4f6dd57b6 100644 (file)
@@ -194,9 +194,10 @@ rpl_mbrtowc (wchar_t *pwc, const char *s, size_t n, mbstate_t *ps)
       /* Here m > 0.  */
 
       int res;
-
+      {
 #  define FITS_IN_CHAR_TYPE(wc)  ((wc) <= WCHAR_MAX)
 #  include "mbrtowc-impl-utf8.h"
+      }
 
      success:
       /* res >= 0 is the corrected return value of