Re: [HACKERS] compiler warning in set_tablefunc_size_estimates

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [HACKERS] compiler warning in set_tablefunc_size_estimates
Дата
Msg-id 25755.1489095582@sss.pgh.pa.us
обсуждение исходный текст
Ответ на [HACKERS] compiler warning in set_tablefunc_size_estimates  (Robert Haas <robertmhaas@gmail.com>)
Ответы Re: [HACKERS] compiler warning in set_tablefunc_size_estimates
Список pgsql-hackers
Robert Haas <robertmhaas@gmail.com> writes:
> I tried a non-cassert compile on a machine that has a pickier compiler
> than my laptop, and got:

> costsize.c: In function ‘set_tablefunc_size_estimates’:
> costsize.c:4574:17: error: variable ‘rte’ set but not used
> [-Werror=unused-but-set-variable]

> That appears to be a legitimate gripe.  Perhaps:

I think PG_USED_FOR_ASSERTS_ONLY would be a better solution.  It's
only happenstance that the function currently uses the RTE just
for this; if it grows another use, your approach would be harder
to clean up.
        regards, tom lane



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: [HACKERS] exposing wait events for non-backends (was: Tracking wait event for latches)
Следующее
От: Andres Freund
Дата:
Сообщение: Re: [HACKERS] exposing wait events for non-backends (was: Trackingwait event for latches)