Re: Are we missing (void) when return value of fsm_set_and_search is ignored?
От
Peter Eisentraut
Тема
Re: Are we missing (void) when return value of fsm_set_and_search is ignored?
Дата
Msg-id
50b0355c-2afd-5c0a-5c93-7a2fce268a11@enterprisedb.com
Ответ на
Are we missing (void) when return value of fsm_set_and_search is ignored? (Bharath Rupireddy)
Список
Дерево обсуждения
Are we missing (void) when return value of fsm_set_and_search is ignored? Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Re: Are we missing (void) when return value of fsm_set_and_search is ignored? Peter Eisentraut <peter.eisentraut@enterprisedb.com>
Re: Are we missing (void) when return value of fsm_set_and_search is ignored? Julien Rouhaud <rjuju123@gmail.com>
Re: Are we missing (void) when return value of fsm_set_and_search is ignored? Peter Eisentraut <peter.eisentraut@enterprisedb.com>
Re: Are we missing (void) when return value of fsm_set_and_search is ignored? Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Re: Are we missing (void) when return value of fsm_set_and_search is ignored? Julien Rouhaud <rjuju123@gmail.com>
Re: Are we missing (void) when return value of fsm_set_and_search is ignored? Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Re: Are we missing (void) when return value of fsm_set_and_search is ignored? Dilip Kumar <dilipbalaut@gmail.com>
Re: Are we missing (void) when return value of fsm_set_and_search is ignored? Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Re: Are we missing (void) when return value of fsm_set_and_search is ignored? Dilip Kumar <dilipbalaut@gmail.com>
Re: Are we missing (void) when return value of fsm_set_and_search is ignored? Julien Rouhaud <rjuju123@gmail.com>
Re: Are we missing (void) when return value of fsm_set_and_search is ignored? Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
On 03.06.21 12:54, Bharath Rupireddy wrote: > It looks like for some of the fsm_set_and_search calls whose return > value is ignored (in fsm_search and RecordPageWithFreeSpace), there's > no (void). Is it intentional? In the code base, we generally have > (void) when non-void return value of a function is ignored. I don't think that is correct. I don't see anyone writing (void) printf(...); 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.
В списке pgsql-hackers по дате отправления
От: Bharath Rupireddy
Дата: