Re: tapeblocks is uninitialized in logtape.c
От | Tom Lane |
---|---|
Тема | Re: tapeblocks is uninitialized in logtape.c |
Дата | |
Msg-id | 25790.1518641281@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: tapeblocks is uninitialized in logtape.c (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>) |
Ответы |
Re: tapeblocks is uninitialized in logtape.c
|
Список | pgsql-hackers |
Peter Eisentraut <peter.eisentraut@2ndquadrant.com> writes: > On 2/13/18 23:10, Tom Lane 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? > This warning comes from using -Og instead of -O2. 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. regards, tom lane
В списке pgsql-hackers по дате отправления: