Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1YWsaZ-00027h-Ng for pgsql-committers@arkaria.postgresql.org; Sat, 14 Mar 2015 20:23:15 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1YWsaY-0000yE-8v for pgsql-committers@arkaria.postgresql.org; Sat, 14 Mar 2015 20:23:14 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1YWsaX-0000y7-9y for pgsql-committers@postgresql.org; Sat, 14 Mar 2015 20:23:13 +0000 Received: from mout.gmx.net ([212.227.17.22]) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1YWsaT-0004Jk-Tq for pgsql-committers@postgresql.org; Sat, 14 Mar 2015 20:23:11 +0000 Received: from auth1-smtp.messagingengine.com ([66.111.4.227]) by mail.gmx.com (mrgmx101) with ESMTPSA (Nemesis) id 0Mchyv-1Yop6x2nlh-00Hsua for ; Sat, 14 Mar 2015 21:23:06 +0100 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailauth.nyi.internal (Postfix) with ESMTP id E5F0520698 for ; Sat, 14 Mar 2015 16:23:02 -0400 (EDT) Received: from frontend2 ([10.202.2.161]) by compute4.internal (MEProxy); Sat, 14 Mar 2015 16:23:04 -0400 X-Sasl-enc: CGH5UBP41t98SK4whdNOouqw+VMO/kGWyoTqGsGcu0RR 1426364584 Received: from [10.0.0.13] (unknown [67.165.24.246]) by mail.messagingengine.com (Postfix) with ESMTPA id 6944268010B; Sat, 14 Mar 2015 16:23:04 -0400 (EDT) Message-ID: <550498A7.2020300@gmx.net> Date: Sat, 14 Mar 2015 16:23:03 -0400 From: Peter Eisentraut User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: Fujii Masao , Michael Paquier CC: Andres Freund , Fujii Masao , pgsql-committers Subject: Re: pgsql: Add GUC to enable compression of full page images stored in WAL. References: <20150311141819.GI12445@alap3.anarazel.de> In-Reply-To: Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K0:e7OCoc5zb1bBP1SRAzRHUekrz0GidNhN1I8d+K6ZMOVc5EZaDJo qNCeV0GaU3NV3amKgg/v2C22G0AjOa3fa6wHnsjaIYXfkT8ZuwYI13PcJItNw6fyHALjVNy cOvmgJwXF/4QeqQMymT35CsN4Dg6tyU6hPEkD0fdgTETZRJqr+2LYlQ5fuoLHrVxdfxC7Aj B5L0YT7+kZ3+D9Bf+VzcQ== X-UI-Out-Filterresults: notjunk:1; X-Pg-Spam-Score: -2.9 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-committers Precedence: bulk Sender: pgsql-committers-owner@postgresql.org On 3/12/15 6:13 AM, Fujii Masao wrote: > On Wed, Mar 11, 2015 at 11:30 PM, Michael Paquier > wrote: >> On Wed, Mar 11, 2015 at 11:18 PM, Andres Freund 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