From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1791) id 27A053858285; Wed, 7 Feb 2024 14:03:59 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 27A053858285 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1707314639; bh=t+uTccoIXwtVloPoYSAZqQzHGURkRzy60pk9OUKEQpQ=; h=From:To:Subject:Date:From; b=cU3ApNPTgVqk7ciATVwOENBrP+NnC1auckGBErmSXxrwDlOsE0W4YWCG6AmxDIADC R0lO1CqFVBUQ3fLQHPTbJkcok+o24lgori9K3euseJ31WRZukzv8UMHmoEuWqbcGzn CYEMYQ5B+/7iEGKd7pjNvpTk4gHKEGTglNBMC/iQ= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Adhemerval Zanella To: glibc-cvs@sourceware.org Subject: [glibc/azanella/clang] stdlib: Remove -Wmaybe-uninitialized supression on setenv.c X-Act-Checkin: glibc X-Git-Author: Adhemerval Zanella X-Git-Refname: refs/heads/azanella/clang X-Git-Oldrev: b97ab93852de15f99e54ceb5a623fc44995e8cf2 X-Git-Newrev: 8bc11395602856e6419f23401f85f336b3f7b456 Message-Id: <20240207140359.27A053858285@sourceware.org> Date: Wed, 7 Feb 2024 14:03:59 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=8bc11395602856e6419f23401f85f336b3f7b456 commit 8bc11395602856e6419f23401f85f336b3f7b456 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. 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 #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 #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)