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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Use "(void)" to mark pgstat_lock_entry(..., false) calls.
Date: 2025-04-06 15:37:16
Message-ID: E1u1S3g-002yo5-1Z@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

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(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2025-04-06 15:57:30 pgsql: Fix memory leaks in px_crypt_shacrypt().
Previous Message Andrew Dunstan 2025-04-06 13:33:01 pgsql: Avoid unnecessary copying of a string in pg_restore.c