Re: pgsql: Add various assertions to heap pruning code. - Mailing list pgsql-committers

From Peter Geoghegan
Subject Re: pgsql: Add various assertions to heap pruning code.
Date
Msg-id CAH2-WznwWU+9on9nZCnZtk7uA238MCTgPxYr1Ty7U_Msn5ZGwQ@mail.gmail.com
Whole thread Raw
In response to Re: pgsql: Add various assertions to heap pruning code.  (Michael Paquier <michael@paquier.xyz>)
List pgsql-committers
On Thu, Nov 4, 2021 at 11:48 PM Michael Paquier <michael@paquier.xyz> wrote:
> This generates some warnings on Windows without asserts:
> pruneheap.c(847): warning C4101: 'htup' unreferenced local variable
> pruneheap.c(859): warning C4101: 'tolp' unreferenced local variable
>
> You could move those two variables within their USE_ASSERT_CHECKING
> blocks, for example.

Why doesn't PG_USED_FOR_ASSERTS_ONLY work on this platform? If it
doesn't work on this platform at all, but I'm required to avoid these
warnings all the same, then why do we even have
PG_USED_FOR_ASSERTS_ONLY? If it works in at least some cases on this
platform, then why not in this particular case?

-- 
Peter Geoghegan



pgsql-committers by date:

Previous
From: Alvaro Herrera
Date:
Subject: pgsql: Avoid crash in rare case of concurrent DROP
Next
From: Robert Haas
Date:
Subject: pgsql: Don't set ThisTimeLineID when there's no reason to do so.