public inbox for glibc-cvs@sourceware.org
help / color / mirror / Atom feed
From: Adhemerval Zanella <azanella@sourceware.org>
To: glibc-cvs@sourceware.org
Subject: [glibc/azanella/clang] stdlib: Remove -Wmaybe-uninitialized supression on setenv.c
Date: Wed, 17 Apr 2024 20:04:21 +0000 (GMT)	[thread overview]
Message-ID: <20240417200421.86E973858C52@sourceware.org> (raw)

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=a7df44378e63916194c430146ebc274725032016

commit a7df44378e63916194c430146ebc274725032016
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
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.

Diff:
---
 stdlib/setenv.c | 13 ++-----------
 1 file 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)

             reply	other threads:[~2024-04-17 20:04 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-17 20:04 Adhemerval Zanella [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-04-02 15:50 Adhemerval Zanella
2024-02-09 17:28 Adhemerval Zanella
2024-02-07 14:03 Adhemerval Zanella
2024-01-29 17:54 Adhemerval Zanella
2023-12-21 18:50 Adhemerval Zanella
2023-09-28 17:48 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:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

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

  git send-email \
    --in-reply-to=20240417200421.86E973858C52@sourceware.org \
    --to=azanella@sourceware.org \
    --cc=glibc-cvs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* 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).