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

From Jaime Casanova
Subject Re: tapeblocks is uninitialized in logtape.c
Date
Msg-id CAJGNTePb20BNROnziQEdB_7d5m6_i-nW81NiouP1sz5xCU5maA@mail.gmail.com
Whole thread Raw
In response to Re: tapeblocks is uninitialized in logtape.c  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: tapeblocks is uninitialized in logtape.c  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On 13 February 2018 at 23:10, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> 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?
>

gcc version 6.3.0 20170516 (Debian 6.3.0-18)

> (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.)
>

i tried to fix the ones in your 2nd attachment, but i'm not real sure
about what value initialize the typename array in objectaddress.c and
the bool values in pgbench.c (both of them i initialized to NULL)

--
Jaime Casanova                      www.2ndQuadrant.com
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

Attachment

pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: Is this a bug?
Next
From: Ankit Raj
Date:
Subject: Re: Google Summer of Code 2018