From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1791) id F06833858C2A; Thu, 21 Dec 2023 18:50:42 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org F06833858C2A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1703184642; bh=MpkDTrFLkhnOuhkwmTgr2VeNSk34LBA1c7QkHA13q3I=; h=From:To:Subject:Date:From; b=ipHfNMGAoigz34vMIytWlXJkDtH7StmCyTnt9uTXk5xEFVJ7eBRCzl1v/5JGqe8ky 6MgSkaQmEfN0geB67ECd2whK7amY5/lQXCXLpHk9V7TcHCp1uyJXRaQLul/PXETXua A0watQ3ARzpFHtrbZVHy0sSD8W69kJ7xhQnqe2nw= 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: a040289c87f3be67ed5f304db2d0bb256b83448c X-Git-Newrev: 2140ff6aaf1f4117b624d21683e0d33eca96028a Message-Id: <20231221185042.F06833858C2A@sourceware.org> Date: Thu, 21 Dec 2023 18:50:42 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=2140ff6aaf1f4117b624d21683e0d33eca96028a commit 2140ff6aaf1f4117b624d21683e0d33eca96028a 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)