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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Add casts to simplehash.h to silence C++ warnings.
Date: 2022-11-03 14:47:40
Message-ID: E1oqbVN-000GWE-2d@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

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

Browse pgsql-committers by date

  From Date Subject
Next Message Alvaro Herrera 2022-11-03 15:41:56 pgsql: Resolve partition strategy during early parsing
Previous Message Tom Lane 2022-11-03 13:19:00 Re: pgsql: Straighten include order in guc-file.l