Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vPMtZ-00H7g2-0X for pgsql-hackers@arkaria.postgresql.org; Sat, 29 Nov 2025 15:29:57 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vPMtV-00ExEl-1z for pgsql-hackers@arkaria.postgresql.org; Sat, 29 Nov 2025 15:29:53 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vPMtU-00ExEd-2z for pgsql-hackers@lists.postgresql.org; Sat, 29 Nov 2025 15:29:53 +0000 Received: from fhigh-b5-smtp.messagingengine.com ([202.12.124.156]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vPMtS-002FZ5-1k for pgsql-hackers@lists.postgresql.org; Sat, 29 Nov 2025 15:29:52 +0000 Received: from phl-compute-03.internal (phl-compute-03.internal [10.202.2.43]) by mailfhigh.stl.internal (Postfix) with ESMTP id 9755E7A00E4; Sat, 29 Nov 2025 10:29:50 -0500 (EST) Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-03.internal (MEProxy); Sat, 29 Nov 2025 10:29:50 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eisentraut.org; h=cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm3; t=1764430190; x=1764516590; bh=dZOhX2rGD4K5lWC2ceZzsKzqjDOB9l2r9GfgVo8vhHI=; b= Rcgot3NBhaKGM5+MYZh/tmpdwn/WaPly/+N1zNID08ukaHYO+L2dNLjIGP2AFAYN wmFZS7i3fDGXOW77CRa5vYb92FMrqaCYRchXNhaagHdrajYlL/U4IZNEz8GH3PJ/ HKIstmt+065QaaQxu5B2f/xDFzvj9mIuWk+CvXJqq4o9ZYwop74aC6umVmKQmvUf kwgSKRgPmfh8nxg7SiVTd22zblj43neWpmU7t4sh8yUfJ9kH8yfc4coYj2Aaxp7e EcmSF0bSPS8oeq5znlgDDqUeSxEt+dYQZov5KCBD97pMBM03jDo2npwooMKNWFPU Zd8VS2pT1GYBIu+jLTkrPQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm1; t=1764430190; x=1764516590; bh=d ZOhX2rGD4K5lWC2ceZzsKzqjDOB9l2r9GfgVo8vhHI=; b=HSkDniO2Q/FSqAgPI ciXKTGPnWfXEUY39Yl0AhoUyaqsDZ/12fTK7YkhjT+Z9eIyI3+utTdXdtLbICG45 XRmomPl4rvRp9MbMqz4duIrndW18DU1hTpDrWmJKScY6ncEp46jFeQVSn2cqUMq0 0F3Qxrk9yc5GGIgBA/iJ9dpeCCtcqL8/vCkQfW83JENpipyiwvKvOtApg8W+WKHi azPlaRGLQJ4eYHjfa/XaAz39ThPLefOJkqEADS2wEuDK1KkLtQCvs8vWNjYK+NBq YnHxVXRWfKV7OcBbQE792fEvd/6wC3bCDVbEkPVznlBPGGV9L13p0pG2D7pZHc7u XHkrQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtdeggddvhedvkeduucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceu rghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujf gurhepkfffgggfuffvfhfhjggtgfesthekredttddvjeenucfhrhhomheprfgvthgvrhcu gfhishgvnhhtrhgruhhtuceophgvthgvrhesvghishgvnhhtrhgruhhtrdhorhhgqeenuc ggtffrrghtthgvrhhnpeffueetudelgeejiedujefgteehhfdtudekhedthedtgedugffh tdevudegudduieenucffohhmrghinhepphhoshhtghhrvghsqhhlrdhorhhgnecuvehluh hsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepphgvthgvrhesvghi shgvnhhtrhgruhhtrdhorhhgpdhnsggprhgtphhtthhopedvpdhmohguvgepshhmthhpoh huthdprhgtphhtthhopehlihdrvghvrghnrdgthhgrohesghhmrghilhdrtghomhdprhgt phhtthhopehpghhsqhhlqdhhrggtkhgvrhhssehlihhsthhsrdhpohhsthhgrhgvshhqlh drohhrgh X-ME-Proxy: Feedback-ID: ie0a040ee:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sat, 29 Nov 2025 10:29:49 -0500 (EST) Message-ID: Date: Sat, 29 Nov 2025 16:29:47 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Cleanup shadows variable warnings, round 1 To: Chao Li , Postgres hackers References: Content-Language: en-US From: Peter Eisentraut In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 28.11.25 09:16, Chao Li wrote: > Hi Hackers, > > While reviewing [1], it makes me recall an experience where I had a > patch ready locally, but CommitFest CI failed with a shadows-variable > warning. Now I understand that -Wall doesn't by default enable -Wshadows > with some compilers like clang. > > I did a clean build with manually enabling -Wshadow and > surprisingly found there are a lot of such warnings in the current code > base, roughly ~200 occurrences. > > As there are too many, I plan to fix them all in 3-4 rounds. For round 1 > patch, I'd see any objection, then decide if to proceed more rounds. See for a previous long thread on this, which led to the addition of the -Wshadow=compatible-local flag. I think this is a slightly unsatisfactory state, because that is a gcc-specific option, and maybe you are using clang or something else. So maybe some further cleanup is useful, but please check the previous discussions.