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: Add casts to simplehash.h to silence C++ warnings.
Date: Thu, 03 Nov 2022 14:47:40 +0000
Message-ID: <E1oqbVN-000GWE-2d@gemulon.postgresql.org> (raw)

Add casts to simplehash.h to silence C++ warnings.

Casting the result of palloc etc. to the intended type is more per
project style anyway.

(The fact that cpluspluscheck doesn't notice these problems is
because it doesn't expand any macros, which seems like a troubling
shortcoming.  Don't have a good idea about improving that.)

Back-patch to v13, which is as far as the patch applies cleanly;
doesn't seem worth working harder.

David Geier

Discussion: https://postgr.es/m/aa5d88a3-71f4-3455-11cf-82de0372c941@gmail.com

Branch
------
REL_14_STABLE

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

Modified Files
--------------
src/include/lib/simplehash.h | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)



view thread (4+ messages)  latest in thread

Message-ID: <E1oqbVN-000GWE-2d@gemulon.postgresql.org>
Permalink:  ../E1oqbVN-000GWE-2d@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1oqbVN-000GWE-2d@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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: tgl@sss.pgh.pa.us
  Subject: Re: pgsql: Add casts to simplehash.h to silence C++ warnings.
  In-Reply-To: <E1oqbVN-000GWE-2d@gemulon.postgresql.org>
  References: <E1oqbVN-000GWE-2d@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