pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Use "(void)" to mark pgstat_lock_entry(..., false) calls.
Date: Sun, 06 Apr 2025 15:37:16 +0000
Message-ID: <E1u1S3g-002yo5-1Z@gemulon.postgresql.org> (raw)

Use "(void)" to mark pgstat_lock_entry(..., false) calls.

This should silence Coverity's complaints about the result being
sometimes ignored.

I'm inclined to think that these routines are simply misdesigned,
because sometimes it's okay to ignore the result and sometimes it
isn't, and we have no way to enforce the latter.  But for now
I just added a comment.

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/2e4ccf1b4508cc337bb4d0afff1e32a049d549fc

Modified Files
--------------
src/backend/utils/activity/pgstat.c          |  2 +-
src/backend/utils/activity/pgstat_database.c |  2 +-
src/backend/utils/activity/pgstat_shmem.c    | 11 ++++++++++-
3 files changed, 12 insertions(+), 3 deletions(-)



Message-ID: <E1u1S3g-002yo5-1Z@gemulon.postgresql.org>
Permalink:  ../E1u1S3g-002yo5-1Z@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1u1S3g-002yo5-1Z@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: tgl@sss.pgh.pa.us, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Use "(void)" to mark pgstat_lock_entry(..., false) calls.
  In-Reply-To: <E1u1S3g-002yo5-1Z@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 DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox