Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ncBoN-0004KC-BE for pgsql-hackers@arkaria.postgresql.org; Wed, 06 Apr 2022 19:59:27 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1ncBoK-00068K-Jw for pgsql-hackers@arkaria.postgresql.org; Wed, 06 Apr 2022 19:59:24 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ncBoK-00068B-AP for pgsql-hackers@lists.postgresql.org; Wed, 06 Apr 2022 19:59:24 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ncBoD-0001Du-KL for pgsql-hackers@lists.postgresql.org; Wed, 06 Apr 2022 19:59:23 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 236JxDKw3171402; Wed, 6 Apr 2022 15:59:14 -0400 From: Tom Lane To: Peter Geoghegan cc: pgsql-hackers@lists.postgresql.org Subject: New compiler warning from btree dedup code MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <3171400.1649275153.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Wed, 06 Apr 2022 15:59:13 -0400 Message-ID: <3171401.1649275153@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk I just noticed that if I build without asserts on my Mac laptop (using Apple's latest clang, 13.1.6) I get nbtdedup.c:68:8: warning: variable 'pagesaving' set but not used [-Wunused= -but-set-variable] Size pagesaving =3D 0; ^ 1 warning generated. Apparently, late-model clang can figure out that the variable is incremented but not otherwise used. This is enough to shut it up, but I wonder if you have another preference: - Size pagesaving =3D 0; + Size pagesaving PG_USED_FOR_ASSERTS_ONLY =3D 0; regards, tom lane