about summary refs log tree commit diff
path: root/stdio-common/vfscanf.c
diff options
context:
space:
mode:
Diffstat (limited to 'stdio-common/vfscanf.c')
-rw-r--r--stdio-common/vfscanf.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/stdio-common/vfscanf.c b/stdio-common/vfscanf.c
index f8f97cd1d2..8cd59557a6 100644
--- a/stdio-common/vfscanf.c
+++ b/stdio-common/vfscanf.c
@@ -27,6 +27,7 @@
 #include <string.h>
 #include <wchar.h>
 #include <wctype.h>
+#include <libc-internal.h>
 #include <libc-lock.h>
 #include <locale/localeinfo.h>
 #include <scratch_buffer.h>
@@ -1535,6 +1536,13 @@ _IO_vfscanf_internal (_IO_FILE *s, const char *format, _IO_va_list argptr,
 		    {
 		      /* Get the string for the digits with value N.  */
 #ifdef COMPILE_WSCANF
+
+		      /* wcdigits_extended[] is fully set in the loop
+			 above, but the test for "map != NULL" is done
+			 inside the loop here and outside the loop there.  */
+		      DIAG_PUSH_NEEDS_COMMENT;
+		      DIAG_IGNORE_NEEDS_COMMENT (4.7, "-Wmaybe-uninitialized");
+
 		      if (__glibc_unlikely (map != NULL))
 			wcdigits[n] = wcdigits_extended[n];
 		      else
@@ -1542,6 +1550,8 @@ _IO_vfscanf_internal (_IO_FILE *s, const char *format, _IO_va_list argptr,
 			  _NL_CURRENT (LC_CTYPE, _NL_CTYPE_INDIGITS0_WC + n);
 		      wcdigits[n] += from_level;
 
+		      DIAG_POP_NEEDS_COMMENT;
+
 		      if (c == (wint_t) *wcdigits[n])
 			{
 			  to_level = from_level;