Re: Compiler warnings

From: Stephen Frost <sfrost(at)snowman(dot)net>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Compiler warnings
Date: 2016-11-29 15:25:38
Message-ID: 20161129152538.GS13284@tamriel.snowman.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

* Stephen Frost (sfrost(at)snowman(dot)net) wrote:
> diff --git a/src/backend/utils/cache/plancache.c b/src/backend/utils/cache/plancache.c
> new file mode 100644
> index 884cdab..b5d97c8
> *** a/src/backend/utils/cache/plancache.c
> --- b/src/backend/utils/cache/plancache.c
> *************** GetCachedPlan(CachedPlanSource *plansour
> *** 1196,1204 ****
> */
> qlist = NIL;
> }
> ! }
> !
> ! if (customplan)
> {
> /* Build a custom plan */
> plan = BuildCachedPlan(plansource, qlist, boundParams);
> --- 1196,1203 ----
> */
> qlist = NIL;
> }
> ! }
> ! else
> {
> /* Build a custom plan */
> plan = BuildCachedPlan(plansource, qlist, boundParams);

Meh, of course this isn't correct since we could change 'customplan'
inside the first if() block to be true, the right answer is really to
just do:

CachedPlan *plan = NULL;

at the top and keep it simple.

ENEEDMORECOFFEE.

Thanks!

Stephen

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2016-11-29 15:35:36 Re: Dynamic shared memory areas
Previous Message Stephen Frost 2016-11-29 15:21:02 Compiler warnings