Re: [HACKERS] Cache Hash Index meta page.

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: [HACKERS] Cache Hash Index meta page.
Дата
Msg-id CA+TgmoaxYXSxYMnwZU82gLXTOwDwbPVp_VMv0G+girOi0836Qw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [HACKERS] Cache Hash Index meta page.  (Mithun Cy <mithun.cy@enterprisedb.com>)
Список pgsql-hackers
On Tue, Feb 7, 2017 at 1:52 PM, Mithun Cy <mithun.cy@enterprisedb.com> wrote:
> On Tue, Feb 7, 2017 at 11:21 PM, Erik Rijkers <er@xs4all.nl> wrote:
>> On 2017-02-07 18:41, Robert Haas wrote:
>>>
>>> Committed with some changes (which I noted in the commit message).
>
> Thanks, Robert and all who have reviewed the patch and given their
> valuable comments.
>
>> This has caused a warning with gcc 6.20:
>>
>> hashpage.c: In function ‘_hash_getcachedmetap’:
>> hashpage.c:1245:20: warning: ‘cache’ may be used uninitialized in this
>> function [-Wmaybe-uninitialized]
>>     rel->rd_amcache = cache;
>>     ~~~~~~~~~~~~~~~~^~~~~~~
>
> Yes, I also see the warning.  I think the compiler is not able to see
> cache is always initialized and used under condition if
> (rel->rd_amcache == NULL).
> I think to make the compiler happy we can initialize the cache with
> NULL when it is defined.

Thanks for the reports and patch.  Committed.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



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

Предыдущее
От: Mithun Cy
Дата:
Сообщение: Re: [HACKERS] Cache Hash Index meta page.
Следующее
От: Stephen Frost
Дата:
Сообщение: [HACKERS] PUBLICATIONS and pg_dump