Re: tapeblocks is uninitialized in logtape.c

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: tapeblocks is uninitialized in logtape.c
Дата
Msg-id 9990.1518642809@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: tapeblocks is uninitialized in logtape.c  (Jaime Casanova <jaime.casanova@2ndquadrant.com>)
Список pgsql-hackers
Jaime Casanova <jaime.casanova@2ndquadrant.com> 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 you'd
fixed the issues in pgbench.c.  The issue seems to be that those compilers
note that coerceToBool doesn't initialize its output argument in all
code paths, and don't note that the callers only examine the output
if it returns true.  So I thought it was better to make coerceToBool
always set the output to something.  That way we aren't totally giving
up error detection in the callers: if there were a code path that used
the output variable without even having called coerceToBool, we'd still
hear about it.

            regards, tom lane


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: tapeblocks is uninitialized in logtape.c
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Cached/global query plans, autopreparation