aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2022-04-11 13:22:37 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2022-04-11 13:22:37 -0400
commit3c702b3ed1519624d50e7a42283b8d481a579f77 (patch)
tree6eef5958a5778a2e795d81399fbc6c5cce917de8 /src
parent93fcf2d2095674834e1ddbc6803ec043e3216afa (diff)
downloadpostgresql-3c702b3ed1519624d50e7a42283b8d481a579f77.tar.gz
postgresql-3c702b3ed1519624d50e7a42283b8d481a579f77.zip
Explicitly ignore guaranteed-true result from pgstat_lock_entry().
With nowait passed as false, pgstat_lock_entry() must return true so there's no need to check its result. Coverity seems unconvinced of this, so whack it upside the head with a (void) cast.
Diffstat (limited to 'src')
-rw-r--r--src/backend/utils/activity/pgstat_shmem.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/backend/utils/activity/pgstat_shmem.c b/src/backend/utils/activity/pgstat_shmem.c
index b270c504ea6..68ff6f51fcf 100644
--- a/src/backend/utils/activity/pgstat_shmem.c
+++ b/src/backend/utils/activity/pgstat_shmem.c
@@ -920,7 +920,7 @@ pgstat_reset_entry(PgStat_Kind kind, Oid dboid, Oid objoid, TimestampTz ts)
if (!entry_ref || entry_ref->shared_entry->dropped)
return;
- pgstat_lock_entry(entry_ref, false);
+ (void) pgstat_lock_entry(entry_ref, false);
shared_stat_reset_contents(kind, entry_ref->shared_stats, ts);
pgstat_unlock_entry(entry_ref);
}