From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1791) id 74ABD3875DCC; Thu, 28 Sep 2023 17:48:55 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 74ABD3875DCC DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1695923335; bh=Kf8Zcneucdipkp59XXBFqDJqj72OZ+sPQBcvdXxpc4k=; h=From:To:Subject:Date:From; b=IXDKgtsyhYHrq01oslCNiqAQhzSg0i/VXZFDJha2oMGmqyaEt0p9akCwnam4UQe7R QlqNJPfDsqzqmnfwQ9C2ysQ7G8j3O3amgRMNWMcwBuj7FdSkIW4bSLZDhmWFjpVk4I Uj8cw3CEOvsKHFzrkOkfH1nvglPBoQxTHP+HA+ik= 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: aea4ddb87168d0475777e605f3bb576b0f62b3a2 X-Git-Newrev: fa16c0a05390efcc6035c3bd945322d03faea7ce Message-Id: <20230928174855.74ABD3875DCC@sourceware.org> Date: Thu, 28 Sep 2023 17:48:55 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=glibc.git;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. Diff: --- 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 #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)