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

Tom Lane <tgl@sss.pgh.pa.us>

Commit: eeb5461e76ae3df40e2443c087ab94925d767434
Author: Tom Lane <tgl@sss.pgh.pa.us>
Date: 2022-11-03T14:47:31Z
Releases: 14.6
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

Files

PathChange+/−
src/include/lib/simplehash.h modified +5 −5

Discussion