Re: pgsql: Fix blatantly broken record_image_cmp() logic for pass-by-value

Поиск
Список
Период
Сортировка
От Kevin Grittner
Тема Re: pgsql: Fix blatantly broken record_image_cmp() logic for pass-by-value
Дата
Msg-id 1383950030.7078.YahooMailNeo@web162903.mail.bf1.yahoo.com
обсуждение исходный текст
Ответ на Re: pgsql: Fix blatantly broken record_image_cmp() logic for pass-by-value  (Kevin Grittner <kgrittn@ymail.com>)
Список pgsql-committers
Kevin Grittner <kgrittn@ymail.com> wrote:

> I distilled it down to the simplest case I could find which
> failed to produce the warning; attached.

For a compiler which seems to like to generate warnings for really
esoteric cases, clang falls down rather badly on uninitialized
variables -- at least on the package for Ubuntu 12.10.  It does not
complain at all about this:


int warning_test(int a);
int warning_test(int a)
{
    int result;

    if (a == 1)
        result = 1;

    return result;
}


I assume that everyone here agrees that merits a warning?

Bug reports filed.

--
Kevin Grittner
EDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


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

Предыдущее
От: Kevin Grittner
Дата:
Сообщение: Re: pgsql: Fix blatantly broken record_image_cmp() logic for pass-by-value
Следующее
От: Andres Freund
Дата:
Сообщение: Re: pgsql: Fix pg_isolation_regress to work outside its build directory.