Re: Are we missing (void) when return value of fsm_set_and_search is ignored?
В списке pgsql-hackers по дате отправления:
| От | 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 <bharath.rupireddyforpostgres@gmail.com>) |
| Ответы |
Re: Are we missing (void) when return value of fsm_set_and_search is ignored?
|
| Список | pgsql-hackers |
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 по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера