Re: Are we missing (void) when return value of fsm_set_and_search is ignored?

Поиск
Список
Период
Сортировка
От Bharath Rupireddy
Тема Re: Are we missing (void) when return value of fsm_set_and_search is ignored?
Дата
Msg-id CALj2ACX0XBi=WGG+MB1t-SmesC1vEk9L-nF7qAurem48N=82Xw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Are we missing (void) when return value of fsm_set_and_search is ignored?  (Julien Rouhaud <rjuju123@gmail.com>)
Список pgsql-hackers
On Fri, Jun 4, 2021 at 9:58 AM Julien Rouhaud <rjuju123@gmail.com> wrote:
> > so this is not a generally applicable strategy.
> >
> > We have pg_nodiscard for functions where you explicitly want callers to
> > check the return value.  In all other cases, callers are free to ignore
> > return values.
>
> Yes, but we have a lot a examples of functions without pg_nodiscard and callers
> still explicitly ignoring the results, like fsm_vacuum_page() in the same file.
> It would be more consistent and make the code slightly more self explanatory.

Yeah, just for consistency reasons (void) casting can be added to fsm_set_and_search when it's return value is ignored.

With Regards,
Bharath Rupireddy.

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

Предыдущее
От: Bharath Rupireddy
Дата:
Сообщение: Re: Refactor "mutually exclusive options" error reporting code in parse_subscription_options
Следующее
От: Amit Langote
Дата:
Сообщение: Re: Skip partition tuple routing with constant partition key