Robert,
* Robert Haas (robertmhaas@gmail.com) wrote:
> On Tue, Dec 6, 2016 at 3:23 PM, Stephen Frost <sfrost@snowman.net> wrote:
> > Given the lack of screaming, I'll push the attached in a bit, which just
> > initializes the two variables being complained about. As mentioned,
> > there doesn't appear to be any live bugs here, this is just to silence
> > the compiler warnings.
>
> In LWLockRelease, why not just move mode = held_lwlocks[i].mode; after
> the if (i < 0) elog(...), instead of initializing with a bogus value?
Good thought, thanks!
Updated patch attached with that change and I also added an Assert() to
GetCachedPlan(), in case that code gets whacked around later and somehow
we end up falling through without actually setting *plan.
Thoughts?
Thanks!
Stephen