pgsql: Silence Coverity warning about unused visibilitymap_clear() resu

From: Melanie Plageman <melanieplageman(at)gmail(dot)com>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Silence Coverity warning about unused visibilitymap_clear() resu
Date: 2026-08-04 22:06:59
Message-ID: E1wrNHn-00000000DgW-49Tz@gemulon.postgresql.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Silence Coverity warning about unused visibilitymap_clear() result

Commit c0d9864f5ce made all but one caller of visibilitymap_clear() check
its return value, causing Coverity to flag the remaining unchecked call
in heap_page_fix_vm_corruption().

This VM clear is not WAL-logged, so the caller doesn't need the return
value of visibilitymap_clear(). Add an explicit void cast and comment to
document that the return value is intentionally ignored.

Backpatch to 19 when the number of callers discarding the return value
dropped low enough to trigger Coverity's warning.

Discussion: https://postgr.es/m/1065814.1784514869%40sss.pgh.pa.us
Reported-by: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Backpatch-through: 19

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/a37e5745453f76e4bec208920773ef9c90fd50d1

Modified Files
--------------
src/backend/access/heap/pruneheap.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Melanie Plageman 2026-08-04 22:11:56 pgsql: Silence Coverity warning about unused visibilitymap_clear() resu
Previous Message Michael Paquier 2026-08-04 21:53:49 pgsql: Improving handling of oversized records in xlogreader.c