From b4625db1d0757adc5b96e69dea2c2332f495c079 Mon Sep 17 00:00:00 2001 From: Bharath Rupireddy Date: Thu, 3 Jun 2021 05:52:43 -0700 Subject: [PATCH v1] Use (void) when return value of fsm_set_and_search is ignored 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) casting. In the code base, we generally use (void) when non-void return value of a function is ignored. Although it is not a bug or not giving any compiler warning, just use (void) as it seems to be a standard practice in the code base. --- src/backend/storage/freespace/freespace.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/backend/storage/freespace/freespace.c b/src/backend/storage/freespace/freespace.c index 8c12dda238..14e7540230 100644 --- a/src/backend/storage/freespace/freespace.c +++ b/src/backend/storage/freespace/freespace.c @@ -187,7 +187,7 @@ RecordPageWithFreeSpace(Relation rel, BlockNumber heapBlk, Size spaceAvail) /* Get the location of the FSM byte representing the heap block */ addr = fsm_get_location(heapBlk, &slot); - fsm_set_and_search(rel, addr, slot, new_cat, 0); + (void) fsm_set_and_search(rel, addr, slot, new_cat, 0); } /* @@ -752,7 +752,7 @@ fsm_search(Relation rel, uint8 min_cat) * rarely, and will be fixed by the next vacuum. */ parent = fsm_get_parent(addr, &parentslot); - fsm_set_and_search(rel, parent, parentslot, max_avail, 0); + (void) fsm_set_and_search(rel, parent, parentslot, max_avail, 0); /* * If the upper pages are badly out of date, we might need to loop -- 2.25.1