agora inbox for pgsql-committers@postgresql.org  
help / color / mirror / Atom feed
From: Melanie Plageman <melanieplageman@gmail.com>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Silence Coverity warning about unused visibilitymap_clear() resu
Date: Tue, 04 Aug 2026 22:06:59 +0000
Message-ID: <E1wrNHn-00000000DgW-49Tz@gemulon.postgresql.org> (raw)

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@sss.pgh.pa.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(-)



view thread (2+ messages)  latest in thread

Message-ID: <E1wrNHn-00000000DgW-49Tz@gemulon.postgresql.org>
Permalink:  ../E1wrNHn-00000000DgW-49Tz@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1wrNHn-00000000DgW-49Tz@gemulon.postgresql.org

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-committers@postgresql.org
  Cc: melanieplageman@gmail.com, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Silence Coverity warning about unused visibilitymap_clear() resu
  In-Reply-To: <E1wrNHn-00000000DgW-49Tz@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox