Re: tapeblocks is uninitialized in logtape.c

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Jaime Casanova <jaime(dot)casanova(at)2ndquadrant(dot)com>
Cc: Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: tapeblocks is uninitialized in logtape.c
Date: 2018-02-14 04:10:27
Message-ID: 4628.1518581427@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Jaime Casanova <jaime(dot)casanova(at)2ndquadrant(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2018-02-14 04:24:43 Re: TODO item: WAL replay of CREATE TABLESPACE with differing directory structure
Previous Message Peter Eisentraut 2018-02-14 03:58:35 Re: unique indexes on partitioned tables