Re: Uninitialized scalar variable (UNINIT) (src/backend/statistics/extended_stats.c)

Поиск
Список
Период
Сортировка
От Ranier Vilela
Тема Re: Uninitialized scalar variable (UNINIT) (src/backend/statistics/extended_stats.c)
Дата
Msg-id CAEudQAo4OjwizXX9+drxYmVH3NjRjLReTePcbaw_uXS82AdrHA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Uninitialized scalar variable (UNINIT) (src/backend/statistics/extended_stats.c)  (Justin Pryzby <pryzby@telsasoft.com>)
Ответы Re: Uninitialized scalar variable (UNINIT) (src/backend/statistics/extended_stats.c)
Список pgsql-hackers
Hi Justin, sorry for the delay.

Nothing against it, but I looked for similar codes and this is the usual way to initialize HeapTupleData.
Perhaps InvalidOid makes a difference.

regards,
Ranier Vilela


Em dom., 11 de abr. de 2021 às 16:25, Justin Pryzby <pryzby@telsasoft.com> escreveu:
On Sun, Apr 11, 2021 at 03:38:10PM -0300, Ranier Vilela wrote:
> Per Coverity.
>
> It seems to me that some recent commit has failed to properly initialize a
> structure, in extended_stats.c, when is passed to heap_copytuple.

I think you're right.  You can look in the commit history to find the relevant
commit and copy the committer.

I think it's cleanest to write:
|HeapTupleData tmptup = {0};

--
Justin

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

Предыдущее
От: Thomas Munro
Дата:
Сообщение: Re: Possible SSI bug in heap_update
Следующее
От: Thomas Munro
Дата:
Сообщение: Re: Calendar support in localization