Re: Compiler warnings - Mailing list pgsql-hackers

From Stephen Frost
Subject Re: Compiler warnings
Date
Msg-id 20161206204644.GS23417@tamriel.snowman.net
Whole thread Raw
In response to Re: Compiler warnings  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: Compiler warnings
List pgsql-hackers
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

Attachment

pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: WIP: Faster Expression Processing and Tuple Deforming (including JIT)
Next
From: Nico Williams
Date:
Subject: Re: WIP: Faster Expression Processing and Tuple Deforming (including JIT)