pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andres Freund <andres@anarazel.de>
To: Alvaro Herrera <alvherre@2ndquadrant.com>
Cc: pgsql-hackers@postgresql.org
Subject: Re: [COMMITTERS] pgsql: Close some holes in BRIN page assignment
Date: Thu, 13 Aug 2015 01:31:56 +0200
Message-ID: <20150812233156.GF21836@awork2.anarazel.de> (raw)
In-Reply-To: <20150812190808.GM3040@postgresql.org>
References: <E1ZPZiZ-000219-Eq@gemulon.postgresql.org>
	<20150812190808.GM3040@postgresql.org>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>

On 2015-08-12 16:08:08 -0300, Alvaro Herrera wrote:
> Alvaro Herrera wrote:
> > Close some holes in BRIN page assignment
> 
> buildfarm evidently didn't like this one :-(

clang seems to see a (the?) problem:

/home/andres/src/postgresql/src/backend/access/brin/brin_pageops.c:357:6: warning: variable 'extended' is used uninitialized whenever 'if'
      condition is false [-Wsometimes-uninitialized]
        if (!BufferIsValid(*buffer))
            ^~~~~~~~~~~~~~~~~~~~~~~
/home/andres/src/postgresql/src/backend/access/brin/brin_pageops.c:371:6: note: uninitialized use occurs here
        if (extended)
            ^~~~~~~~
/home/andres/src/postgresql/src/backend/access/brin/brin_pageops.c:357:2: note: remove the 'if' if its condition is always true
        if (!BufferIsValid(*buffer))
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/andres/src/postgresql/src/backend/access/brin/brin_pageops.c:330:16: note: initialize the variable 'extended' to silence this warning
        bool            extended;

Looks to me like it's right. That also explains why it's failing on a
fairly random selection of platforms and compilers...

Andres


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers



view thread (6+ messages)  latest in thread

Message-ID: <20150812233156.GF21836@awork2.anarazel.de>
Permalink:  ../20150812233156.GF21836@awork2.anarazel.de/
Also on:    postgresql.org/message-id/20150812233156.GF21836@awork2.anarazel.de

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: andres@anarazel.de, alvherre@2ndquadrant.com, pgsql-hackers@postgresql.org
  Subject: Re: [COMMITTERS] pgsql: Close some holes in BRIN page assignment
  In-Reply-To: <20150812233156.GF21836@awork2.anarazel.de>
  References: <E1ZPZiZ-000219-Eq@gemulon.postgresql.org> <20150812190808.GM3040@postgresql.org> <20150812233156.GF21836@awork2.anarazel.de>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox