From: Tom Lane <tgl@sss.pgh.pa.us>
To: Peter Geoghegan <pg@bowt.ie>
Cc: pgsql-hackers@lists.postgresql.org
Subject: New compiler warning from btree dedup code
Date: Wed, 06 Apr 2022 15:59:13 -0400
Message-ID: <3171401.1649275153@sss.pgh.pa.us> (raw)
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 = 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 = 0;
+ Size pagesaving PG_USED_FOR_ASSERTS_ONLY = 0;
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: tgl@sss.pgh.pa.us, pg@bowt.ie, pgsql-hackers@lists.postgresql.org
Subject: Re: New compiler warning from btree dedup code
In-Reply-To: <3171401.1649275153@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox