Remove PF_USED_FOR_ASSERTS_ONLY from variables in general use
authorDaniel Gustafsson <dgustafsson@postgresql.org>
Tue, 30 Nov 2021 13:02:14 +0000 (14:02 +0100)
committerDaniel Gustafsson <dgustafsson@postgresql.org>
Tue, 30 Nov 2021 13:02:14 +0000 (14:02 +0100)
fsstate in process_pending_requests (in postgres_fdw.c) was added in
8998e3cafa2 as an assertion-only variable,  1ec7fca8592 stated using
the variable outside of assertions.

rd_index in get_index_column_opclass (in lsyscache.c) was introduced
in 2a6368343ff, and then promptly used in the fix commit 7e041603904
shortly thereafter.

This removes the PG_USED_FOR_ASSERTS_ONLY variable decoration from
the above mentioned variables.

Reviewed-by: Greg Nancarrow <gregn4422@gmail.com>
Discussion: https://postgr.es/m/F959106C-0F21-43A5-B2AE-D007D51ACBEE@yesql.se

contrib/postgres_fdw/postgres_fdw.c
src/backend/utils/cache/lsyscache.c

index f767fdcc6a10c7e54c488371e02ef1f42f7aa3f3..fa9a099f1348556e84566764f897e5e534c74c7c 100644 (file)
@@ -7058,7 +7058,7 @@ void
 process_pending_request(AsyncRequest *areq)
 {
    ForeignScanState *node = (ForeignScanState *) areq->requestee;
-   PgFdwScanState *fsstate PG_USED_FOR_ASSERTS_ONLY = (PgFdwScanState *) node->fdw_state;
+   PgFdwScanState *fsstate = (PgFdwScanState *) node->fdw_state;
 
    /* The request would have been pending for a callback */
    Assert(areq->callback_pending);
index 4ebaa552a2766a3643a4340e5e253793ceff001b..9176514a962980cd987ea3afc4be4dc8459113c9 100644 (file)
@@ -3462,7 +3462,7 @@ Oid
 get_index_column_opclass(Oid index_oid, int attno)
 {
    HeapTuple   tuple;
-   Form_pg_index rd_index PG_USED_FOR_ASSERTS_ONLY;
+   Form_pg_index rd_index;
    Datum       datum;
    bool        isnull;
    oidvector  *indclass;