Re: tapeblocks is uninitialized in logtape.c

2018-02-14 Thread Tom Lane
Alvaro Herrera writes: > Tom Lane wrote: >> Actually, on looking closer, it's more likely got something to do with >> whether or not you used --enable-cassert. If the Assert at the top of >> the function is disabled, then IMO a compiler that failed to complain >> about this coding would be pretty

Re: tapeblocks is uninitialized in logtape.c

2018-02-14 Thread Tom Lane
Jaime Casanova writes: > 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) Pushed with minor adjustments. Notably, I didn't like the way

Re: tapeblocks is uninitialized in logtape.c

2018-02-14 Thread Alvaro Herrera
Tom Lane wrote: > Actually, on looking closer, it's more likely got something to do with > whether or not you used --enable-cassert. If the Assert at the top of > the function is disabled, then IMO a compiler that failed to complain > about this coding would be pretty damn broken. I tried removi

Re: tapeblocks is uninitialized in logtape.c

2018-02-14 Thread Tom Lane
Peter Eisentraut writes: > On 2/13/18 23:10, Tom Lane wrote: >> Jaime Casanova 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] >>> lt

Re: tapeblocks is uninitialized in logtape.c

2018-02-14 Thread Tom Lane
Peter Eisentraut writes: > On 2/13/18 23:10, Tom Lane wrote: >> 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. There's a

Re: tapeblocks is uninitialized in logtape.c

2018-02-14 Thread Peter Eisentraut
On 2/13/18 23:10, Tom Lane wrote: > Jaime Casanova 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->off

Re: tapeblocks is uninitialized in logtape.c

2018-02-14 Thread Jaime Casanova
On 13 February 2018 at 23:10, Tom Lane wrote: > Jaime Casanova 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->nBlocksAlloca

Re: tapeblocks is uninitialized in logtape.c

2018-02-13 Thread Tom Lane
I wrote: > Jaime Casanova 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;

Re: tapeblocks is uninitialized in logtape.c

2018-02-13 Thread Tom Lane
Jaime Casanova 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 n

tapeblocks is uninitialized in logtape.c

2018-02-13 Thread Jaime Casanova
On 13 February 2018 at 21:07, Jaime Casanova wrote: > Hi, > > Compiling with CFLAGS="-ggdb -Og -g3 -fno-omit-frame-pointer" as > recommended in https://wiki.postgresql.org/wiki/Developer_FAQ#Compile-time > > My compiler gives me this message > > """ > logtape.c: In function ‘ltsConcatWorkerTapes’: