about summary refs log tree commit diff
diff options
context:
space:
mode:
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>2023-09-13 16:55:27 -0300
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>2024-04-17 16:12:09 -0300
commita7df44378e63916194c430146ebc274725032016 (patch)
treec4f19f5007cb5fe15e70d6575de7ca4697bbc764
parentd7101bde415a3b664fbcf012c3bbcecc6ab8b285 (diff)
downloadglibc-a7df44378e63916194c430146ebc274725032016.tar.gz
glibc-a7df44378e63916194c430146ebc274725032016.tar.xz
glibc-a7df44378e63916194c430146ebc274725032016.zip
stdlib: Remove -Wmaybe-uninitialized supression on setenv.c
It is not required on current supported gcc.
-rw-r--r--stdlib/setenv.c13
1 files changed, 2 insertions, 11 deletions
diff --git a/stdlib/setenv.c b/stdlib/setenv.c
index e2164371ad..a21ffed19f 100644
--- a/stdlib/setenv.c
+++ b/stdlib/setenv.c
@@ -19,13 +19,6 @@
 # include <config.h>
 #endif
 
-/* Pacify GCC; see the commentary about VALLEN below.  This is needed
-   at least through GCC 4.9.2.  Pacify GCC for the entire file, as
-   there seems to be no way to pacify GCC selectively, only for the
-   place where it's needed.  Do not use DIAG_IGNORE_NEEDS_COMMENT
-   here, as it's not defined yet.  */
-#pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
-
 #include <errno.h>
 #if !_LIBC
 # if !defined errno && !defined HAVE_ERRNO_DECL
@@ -121,10 +114,8 @@ __add_to_environ (const char *name, const char *value, const char *combined,
 
   /* Compute lengths before locking, so that the critical section is
      less of a performance bottleneck.  VALLEN is needed only if
-     COMBINED is null (unfortunately GCC is not smart enough to deduce
-     this; see the #pragma at the start of this file).  Testing
-     COMBINED instead of VALUE causes setenv (..., NULL, ...)  to dump
-     core now instead of corrupting memory later.  */
+     COMBINED is null.  Testing COMBINED instead of VALUE causes setenv
+     (..., NULL, ...) to dump core now instead of corrupting memory later.  */
   const size_t namelen = strlen (name);
   size_t vallen;
   if (combined == NULL)