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 1mpinN-0003vQ-Pq for pgsql-hackers@arkaria.postgresql.org; Wed, 24 Nov 2021 03:18:05 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mpinM-0006vj-Bt for pgsql-hackers@arkaria.postgresql.org; Wed, 24 Nov 2021 03:18:04 +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 1mpinM-0006va-2j for pgsql-hackers@lists.postgresql.org; Wed, 24 Nov 2021 03:18:04 +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 1mpinF-0001D8-7x for pgsql-hackers@postgresql.org; Wed, 24 Nov 2021 03:18:03 +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 1AO3HswF085873; Tue, 23 Nov 2021 22:17:54 -0500 From: Tom Lane To: Thomas Munro cc: pgsql-hackers Subject: Re: Warning in geqo_main.c from clang 13 In-reply-to: References: Comments: In-reply-to Thomas Munro message dated "Wed, 24 Nov 2021 15:31:49 +1300" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <85871.1637723874.1@sss.pgh.pa.us> Date: Tue, 23 Nov 2021 22:17:54 -0500 Message-ID: <85872.1637723874@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Thomas Munro writes: > Clang 13 on my machine and peripatus (but not Apple clang 13 on eg > sifika, I'm still confused about Apple's versioning but I think that's > really llvm 12-based) warns: > geqo_main.c:86:8: warning: variable 'edge_failures' set but not used > [-Wunused-but-set-variable] > int edge_failures = 0; Yeah, I noticed that a week or two ago, but didn't see a simple fix. > Here's one way to silence it. I'm kind of inclined to just drop the edge_failures recording/logging altogether, rather than make that rats-nest of #ifdefs even worse. It's not like anyone has cared about that number in the last decade or two. regards, tom lane