Re: Unused variable in postgres_fdw/deparse.c

From: Ashutosh Bapat <ashutosh(dot)bapat(at)enterprisedb(dot)com>
To: Kyotaro HORIGUCHI <horiguchi(dot)kyotaro(at)lab(dot)ntt(dot)co(dot)jp>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Unused variable in postgres_fdw/deparse.c
Date: 2016-10-26 05:30:17
Message-ID: CAFjFpRcFoBn0cd1hMueYtkaL+x_KcBD4kJcuvh4jqKtbviCvDw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Oct 26, 2016 at 6:19 AM, Kyotaro HORIGUCHI
<horiguchi(dot)kyotaro(at)lab(dot)ntt(dot)co(dot)jp> wrote:
> Hello, compiler complains about unused variable during build
> postgres_fdw without assertions (!--enable-cassert).
>
> deparse.c: In function ‘deparseFromExpr’:
> deparse.c:1029:14: warning: unused variable ‘foreignrel’ [-Wunused-variable]
> RelOptInfo *foreignrel = context->foreignrel;
> ^~~~~~~~~~
>
> The attched patch removes it and moves into the assertion below it.
>

Thanks for the patch and sorry for missing this in the review. I

The patch applies but seems to have a trailing white space.
patch -p1 < /mnt/hgfs/tmp/postgre_fdw_delete_unused_var.patch
(Stripping trailing CRs from patch.)
patching file contrib/postgres_fdw/deparse.c
But that's removed my "patch" command.

It compiles cleanly and make check in contrib/postgres_fdw does not
show any failure.

--
Best Wishes,
Ashutosh Bapat
EnterpriseDB Corporation
The Postgres Database Company

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message vinayak 2016-10-26 05:37:03 Minor typo in reorderbuffer.c
Previous Message Karl O. Pinc 2016-10-26 05:29:25 Re: Patch to implement pg_current_logfile() function