Re: tapeblocks is uninitialized in logtape.c

From: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>, Jaime Casanova <jaime(dot)casanova(at)2ndquadrant(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: tapeblocks is uninitialized in logtape.c
Date: 2018-02-14 21:07:55
Message-ID: 20180214210755.dgjsbah3544y5eld@alvherre.pgsql
Views: Raw Message | Whole Thread | Download mbox
Thread:
Lists: pgsql-hackers

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 removing the Assert, and my compiler doesn't complain. I
noticed that the function is static and the only caller has its own
assert about ntapes; yet removing that one doesn't cause a warning
either. I made the function non-static -- still no warning.

gcc (Debian 6.3.0-18) 6.3.0 20170516

--
Álvaro Herrera https://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 Tom Lane 2018-02-14 21:13:29 Re: tapeblocks is uninitialized in logtape.c
Previous Message Nikolay Shaplov 2018-02-14 21:06:36 Re: [PATCH][PROPOSAL] Add enum releation option type