Re: pgsql: Add Bloom filter implementation.

Поиск
Список
Период
Сортировка
От Peter Geoghegan
Тема Re: pgsql: Add Bloom filter implementation.
Дата
Msg-id CAH2-WzkFTihZKe8aJLgC3Ox4odmk2NLd8Q9RspibNeu+r0qU=g@mail.gmail.com
обсуждение исходный текст
Ответ на Re: pgsql: Add Bloom filter implementation.  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
Ответы Re: pgsql: Add Bloom filter implementation.  (Andres Freund <andres@anarazel.de>)
Список pgsql-committers
On Tue, Apr 3, 2018 at 8:39 AM, Peter Eisentraut
<peter.eisentraut@2ndquadrant.com> wrote:
> There is a compiler warning in the tests, with gcc-7:
>
> test_bloomfilter.c: In function 'test_bloomfilter':
> test_bloomfilter.c:40:38: error: '__builtin_snprintf' output may be
> truncated before the last format character [-Werror=format-truncation=]
>    snprintf(element, sizeof(element), "i" INT64_FORMAT, i);
>                                       ^
>
> This can be fixed by allocating one more byte for the possible sign, or
> doing the whole thing in unsigned.

I don't want to do the whole thing in unsigned, because this ties back
fairly directly to an int8 argument from the test_bloomfilter() SQL
function interface.

I proposed the attached, which makes the buffer one byte larger, per
your suggestion.

Thanks
-- 
Peter Geoghegan

Вложения

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

Предыдущее
От: Teodor Sigaev
Дата:
Сообщение: pgsql: Add prefix operator for TEXT type.
Следующее
От: Bruce Momjian
Дата:
Сообщение: pgsql: C comment: mention null handling in BuildTupleFromCStrings()