Re: tapeblocks is uninitialized in logtape.c - Mailing list pgsql-hackers

From Tom Lane
Subject Re: tapeblocks is uninitialized in logtape.c
Date
Msg-id 4628.1518581427@sss.pgh.pa.us
Whole thread Raw
In response to tapeblocks is uninitialized in logtape.c  (Jaime Casanova <jaime.casanova@2ndquadrant.com>)
Responses Re: tapeblocks is uninitialized in logtape.c  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: tapeblocks is uninitialized in logtape.c  (Jaime Casanova <jaime.casanova@2ndquadrant.com>)
Re: tapeblocks is uninitialized in logtape.c  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
List pgsql-hackers
Jaime Casanova <jaime.casanova@2ndquadrant.com> writes:
>> My compiler gives me this message
>> logtape.c: In function ‘ltsConcatWorkerTapes’:
>> logtape.c:462:48: warning: ‘tapeblocks’ may be used uninitialized in
>> this function [-Wmaybe-uninitialized]
>> lts->nBlocksAllocated = lt->offsetBlockNumber + tapeblocks;

FWIW, I'm not seeing that.  What compiler are you using exactly?

(There are one or two other places where I see "may be used uninitialized"
complaints from certain older gcc versions.  Not sure how excited we
should be about removing such warnings.)

            regards, tom lane


pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: unique indexes on partitioned tables
Next
From: Michael Paquier
Date:
Subject: Re: TODO item: WAL replay of CREATE TABLESPACE with differingdirectory structure