pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Peter Eisentraut <peter_e@gmx.net>
To: Fujii Masao <masao.fujii@gmail.com>
To: Michael Paquier <michael.paquier@gmail.com>
Cc: Andres Freund <andres@2ndquadrant.com>
Cc: Fujii Masao <fujii@postgresql.org>
Cc: pgsql-committers <pgsql-committers@postgresql.org>
Subject: Re: pgsql: Add GUC to enable compression of full page images stored in WAL.
Date: Sat, 14 Mar 2015 16:23:03 -0400
Message-ID: <550498A7.2020300@gmx.net> (raw)
In-Reply-To: <CAHGQGwHtSweb4V5dXa-NCbOV+NhOBwiHVbKaVKMqM=02-j_Q3w@mail.gmail.com>
References: <E1YVaX2-0003sF-71@gemulon.postgresql.org>
	<20150311141819.GI12445@alap3.anarazel.de>
	<CAB7nPqSOAwSgUBmCr4LBWLb71Z0uN=RTvqnKCuhMWMY9rkhBrg@mail.gmail.com>
	<CAHGQGwHtSweb4V5dXa-NCbOV+NhOBwiHVbKaVKMqM=02-j_Q3w@mail.gmail.com>
List-Unsubscribe:  <mailto:majordomo@postgresql.org?body=unsub%20pgsql-committers>

On 3/12/15 6:13 AM, Fujii Masao wrote:
> On Wed, Mar 11, 2015 at 11:30 PM, Michael Paquier
> <michael.paquier@gmail.com> wrote:
>> On Wed, Mar 11, 2015 at 11:18 PM, Andres Freund <andres@2ndquadrant.com> wrote:
>>> On 2015-03-11 06:54:16 +0000, Fujii Masao wrote:
>>>> Add GUC to enable compression of full page images stored in WAL.
>>>
>>> This triggers a couple warnings here (gcc 4.9 and 5):
>>>
>>> /home/andres/src/postgresql/src/backend/access/transam/xloginsert.c: In function 'XLogInsert':
>>> /home/andres/src/postgresql/src/backend/access/transam/xloginsert.c:670:5: warning: 'cbimg.hole_length' may be used uninitialized in this function [-Wmaybe-uninitialized]
>>>      memcpy(scratch, &cbimg,
>>>      ^
>>> /home/andres/src/postgresql/src/backend/access/transam/xloginsert.c:494:33: note: 'cbimg.hole_length' was declared here
>>>    XLogRecordBlockCompressHeader cbimg;
>>>                                  ^
>>> /home/andres/src/postgresql/src/backend/access/transam/xloginsert.c:668:20: warning: 'hole_length' may be used uninitialized in this function [-Wmaybe-uninitialized]
>>>     if (hole_length != 0 && is_compressed)
>>>                     ^
>>> /home/andres/src/postgresql/src/backend/access/transam/xloginsert.c:497:10: note: 'hole_length' was declared here
>>>    uint16 hole_length;
>>>
>>> I've not checked whether they're spurious or not.
> 
> Thanks for the report! We can suppress those warnings just by
> initializing cbimg.hole_length and hole_length. But I'd like to apply
> the attached patch which not only initializes the variable but also
> refactors the related code.

Could you please fix this compiler warning soon?




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



view thread (7+ messages)  latest in thread

Message-ID: <550498A7.2020300@gmx.net>
Permalink:  ../550498A7.2020300@gmx.net/
Also on:    postgresql.org/message-id/550498A7.2020300@gmx.net

 · 

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: peter_e@gmx.net, masao.fujii@gmail.com, michael.paquier@gmail.com, andres@2ndquadrant.com, fujii@postgresql.org
  Subject: Re: pgsql: Add GUC to enable compression of full page images stored in WAL.
  In-Reply-To: <550498A7.2020300@gmx.net>
  References: <E1YVaX2-0003sF-71@gemulon.postgresql.org> <20150311141819.GI12445@alap3.anarazel.de> <CAB7nPqSOAwSgUBmCr4LBWLb71Z0uN=RTvqnKCuhMWMY9rkhBrg@mail.gmail.com> <CAHGQGwHtSweb4V5dXa-NCbOV+NhOBwiHVbKaVKMqM=02-j_Q3w@mail.gmail.com> <550498A7.2020300@gmx.net>

* 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