Re: tapeblocks is uninitialized in logtape.c

From: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, 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 17:38:49
Message-ID: c0ce8658-f8a1-77e5-abad-ab37d3a3dfa3@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2/13/18 23:10, Tom Lane wrote:
> 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?

This warning comes from using -Og instead of -O2.

It's the only such warning, so it would be nice to silence it, because
using -Og is somewhat useful.

--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2018-02-14 17:45:51 Re: Cached/global query plans, autopreparation
Previous Message henry@visionlink.org 2018-02-14 17:38:26 Re: Cached/global query plans, autopreparation