public inbox for
help / color / mirror / Atom feed
From: Adhemerval Zanella <>
Subject: [glibc/azanella/clang] stdlib: Remove -Wmaybe-uninitialized supression on setenv.c
Date: Thu, 28 Sep 2023 17:48:55 +0000 (GMT)	[thread overview]
Message-ID: <> (raw);h=fa16c0a05390efcc6035c3bd945322d03faea7ce

commit fa16c0a05390efcc6035c3bd945322d03faea7ce
Author: Adhemerval Zanella <>
Date:   Wed Sep 13 16:55:27 2023 -0300

    stdlib: Remove -Wmaybe-uninitialized supression on setenv.c
    It is not required on current supported gcc.

 stdlib/setenv.c | 13 ++-----------
 1 file changed, 2 insertions(+), 11 deletions(-)

diff --git a/stdlib/setenv.c b/stdlib/setenv.c
index cc71287fcc..873a699200 100644
--- a/stdlib/setenv.c
+++ b/stdlib/setenv.c
@@ -19,13 +19,6 @@
 # include <config.h>
-/* 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)

             reply	other threads:[~2023-09-28 17:48 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-28 17:48 Adhemerval Zanella [this message]
2023-12-21 18:50 Adhemerval Zanella
2024-01-29 17:54 Adhemerval Zanella
2024-02-07 14:03 Adhemerval Zanella
2024-02-09 17:28 Adhemerval Zanella
2024-04-02 15:50 Adhemerval Zanella
2024-04-17 20:04 Adhemerval Zanella

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).