pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Initialize HASHCTL differently, to suppress Coverity warning
2+ messages / 2 participants
[nested] [flat]

* pgsql: Initialize HASHCTL differently, to suppress Coverity warning
@ 2024-08-11 17:22 Heikki Linnakangas <heikki.linnakangas@iki.fi>
  2024-08-11 21:48 ` Re: pgsql: Initialize HASHCTL differently, to suppress Coverity warning Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 2+ messages in thread

From: Heikki Linnakangas @ 2024-08-11 17:22 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Initialize HASHCTL differently, to suppress Coverity warning

Coverity complained that the hash_create() call might access
hash_table_ctl->hctl. That's a false alarm, hash_create() only
accesses that field when passed the HASH_SHARED_MEM flag. Try to
silence it by using a plain local variable instead of a const. That's
how the HASHCTL is initialized in all the other hash_create() calls.

Branch
------
master

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

Modified Files
--------------
src/backend/access/transam/xlogprefetcher.c | 12 +++++-------
1 file changed, 5 insertions(+), 7 deletions(-)



^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: pgsql: Initialize HASHCTL differently, to suppress Coverity warning
  2024-08-11 17:22 pgsql: Initialize HASHCTL differently, to suppress Coverity warning Heikki Linnakangas <heikki.linnakangas@iki.fi>
@ 2024-08-11 21:48 ` Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 2+ messages in thread

From: Tom Lane @ 2024-08-11 21:48 UTC (permalink / raw)
  To: Heikki Linnakangas <heikki.linnakangas@iki.fi>; +Cc: pgsql-committers@lists.postgresql.org

Heikki Linnakangas <heikki.linnakangas@iki.fi> writes:
> Initialize HASHCTL differently, to suppress Coverity warning

koel says this is mis-indented.

			regards, tom lane





^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2024-08-11 21:48 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2024-08-11 17:22 pgsql: Initialize HASHCTL differently, to suppress Coverity warning Heikki Linnakangas <heikki.linnakangas@iki.fi>
2024-08-11 21:48 ` Tom Lane <tgl@sss.pgh.pa.us>

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