Re: Compiler warnings

From: Stephen Frost <sfrost(at)snowman(dot)net>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Compiler warnings
Date: 2016-12-06 20:46:44
Message-ID: 20161206204644.GS23417@tamriel.snowman.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Robert,

* Robert Haas (robertmhaas(at)gmail(dot)com) wrote:
> On Tue, Dec 6, 2016 at 3:23 PM, Stephen Frost <sfrost(at)snowman(dot)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 Content-Type Size
silence-warnings_v3.patch text/x-diff 2.3 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Nico Williams 2016-12-06 21:22:54 Re: WIP: Faster Expression Processing and Tuple Deforming (including JIT)
Previous Message Andres Freund 2016-12-06 20:40:06 Re: WIP: Faster Expression Processing and Tuple Deforming (including JIT)