Re: pgsql: Further fix for EvalPlanQual with mix of local and foreign parti - Mailing list pgsql-committers

From Andres Freund
Subject Re: pgsql: Further fix for EvalPlanQual with mix of local and foreign parti
Date
Msg-id 20220203183655.ralgkh54sdcgysmn@alap3.anarazel.de
Whole thread Raw
In response to pgsql: Further fix for EvalPlanQual with mix of local and foreign parti  (Etsuro Fujita <efujita@postgresql.org>)
Responses Re: pgsql: Further fix for EvalPlanQual with mix of local and foreign parti  (Andres Freund <andres@anarazel.de>)
List pgsql-committers
Hi,

On 2022-02-03 06:22:58 +0000, Etsuro Fujita wrote:
> Further fix for EvalPlanQual with mix of local and foreign partitions.

My compiler (as well as cfbot) now complains that there is an unused variable,
when building without assertions:

/home/andres/src/postgresql/src/backend/executor/nodeForeignscan.c: In function ‘ForeignNext’:
/home/andres/src/postgresql/src/backend/executor/nodeForeignscan.c:47:21: warning: unused variable ‘estate’
[-Wunused-variable]
   47 |         EState     *estate = node->ss.ps.state;
      |                     ^~~~~~

Seems best to just use node->ss.ps.state instead of the local estate variable?
Rather than using the noisier PG_USED_FOR_ASSERTS_ONLY.

I'll make it so, unless you want to?

Greetings,

Andres Freund



pgsql-committers by date:

Previous
From: Andrew Dunstan
Date:
Subject: pgsql: Authorize new user in pg_basebackup tests
Next
From: Andres Freund
Date:
Subject: pgsql: Fix compiler warning in non-assert builds, introduced in f862d57