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
-
Silence compiler warnings
- cbc62b229520 9.5.6 landed
- 5099e8ee2364 9.6.2 landed
- 6b4a1764aa5d 9.3.16 landed
- 8cb9d0182982 9.4.11 landed
- 35d4dd82c2e8 9.5.6 landed
- 7911e78f6cc5 9.6.2 landed
- d97b14ddab20 10.0 landed
-
ilence compiler warnings
- fce04516ec5e 9.2.20 landed
-
Silence Bison deprecation warnings
- 3f9479603cac 9.3.16 landed
- b12b1743b48a 9.2.20 landed
- 55fb759ab3e7 9.4.0 cited
-
Suppress clang's unhelpful gripes about -pthread switch being unused.
- 73b416b2e412 9.5.0 cited