From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1791) id 2ADBF385842A; Tue, 2 Apr 2024 15:50:28 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2ADBF385842A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1712073028; bh=JgnnShLqMSSYmX4c4MSQw2FN8mMMkj3MAXRVWWmLoXw=; h=From:To:Subject:Date:From; b=Uc4Xxs0+iGnwRdCnCudagd3a8jI9BcENZ6lFtLa54kVneaC9teoEhvx5CI0KthiFR iZlE8ysEuhWYbaMlISkHhLCwb/p9njIWS1NpR2d1zGq2kp0dX6M2iEBzYbjLOxP+CV RA8WDZa1k7ZRMQ/84xKFx++cfkHgzBcr8vhdEdXw= 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: 9c05e98b287ad3e734a59d33f6eda32d7eb7961e X-Git-Newrev: c9346a2f294438c2f53be58916967b1fce0afac8 Message-Id: <20240402155028.2ADBF385842A@sourceware.org> Date: Tue, 2 Apr 2024 15:50:28 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=c9346a2f294438c2f53be58916967b1fce0afac8 commit c9346a2f294438c2f53be58916967b1fce0afac8 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)