mirror of
https://github.com/postgres/postgres.git
synced 2025-07-05 07:21:24 +03:00
Clean up compiler warnings from unused variables with asserts disabled
For those variables only used when asserts are enabled, use a new macro PG_USED_FOR_ASSERTS_ONLY, which expands to __attribute__((unused)) when asserts are not enabled.
This commit is contained in:
@ -151,7 +151,7 @@ execCurrentOf(CurrentOfExpr *cexpr,
|
||||
{
|
||||
ScanState *scanstate;
|
||||
bool lisnull;
|
||||
Oid tuple_tableoid;
|
||||
Oid tuple_tableoid PG_USED_FOR_ASSERTS_ONLY;
|
||||
ItemPointer tuple_tid;
|
||||
|
||||
/*
|
||||
|
@ -66,7 +66,7 @@ ExecMaterial(MaterialState *node)
|
||||
* Allocate a second read pointer to serve as the mark. We know it
|
||||
* must have index 1, so needn't store that.
|
||||
*/
|
||||
int ptrno;
|
||||
int ptrno PG_USED_FOR_ASSERTS_ONLY;
|
||||
|
||||
ptrno = tuplestore_alloc_read_pointer(tuplestorestate,
|
||||
node->eflags);
|
||||
|
@ -344,7 +344,7 @@ setop_fill_hash_table(SetOpState *setopstate)
|
||||
SetOp *node = (SetOp *) setopstate->ps.plan;
|
||||
PlanState *outerPlan;
|
||||
int firstFlag;
|
||||
bool in_first_rel;
|
||||
bool in_first_rel PG_USED_FOR_ASSERTS_ONLY;
|
||||
|
||||
/*
|
||||
* get state info from node
|
||||
|
@ -30,7 +30,6 @@ static TupleTableSlot *
|
||||
WorkTableScanNext(WorkTableScanState *node)
|
||||
{
|
||||
TupleTableSlot *slot;
|
||||
EState *estate;
|
||||
Tuplestorestate *tuplestorestate;
|
||||
|
||||
/*
|
||||
@ -48,8 +47,7 @@ WorkTableScanNext(WorkTableScanState *node)
|
||||
* worktable. Therefore, we don't need a private read pointer for the
|
||||
* tuplestore, nor do we need to tell tuplestore_gettupleslot to copy.
|
||||
*/
|
||||
estate = node->ss.ps.state;
|
||||
Assert(ScanDirectionIsForward(estate->es_direction));
|
||||
Assert(ScanDirectionIsForward(node->ss.ps.state->es_direction));
|
||||
|
||||
tuplestorestate = node->rustate->working_table;
|
||||
|
||||
|
Reference in New Issue
Block a user