Re: Compiler warnings

Stephen Frost <sfrost@snowman.net>

From: Stephen Frost <sfrost@snowman.net>
To: pgsql-hackers@postgresql.org
Date: 2016-11-29T15:25:38Z
Lists: pgsql-hackers
* Stephen Frost (sfrost@snowman.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

Commits

  1. Silence compiler warnings

  2. ilence compiler warnings

  3. Silence Bison deprecation warnings

  4. Suppress clang's unhelpful gripes about -pthread switch being unused.