Re: Add explicit casts in four places to simplehash.h

2022-11-04 Thread Tom Lane
David Geier writes: > On 11/3/22 15:50, Tom Lane wrote: >> The bigger picture here is that we do actually endeavor to keep >> (most of) our headers C++ clean, but our tool cpluspluscheck misses >> these problems because it doesn't try to use these macros. >> I wonder whether there is a way to do b

Re: Add explicit casts in four places to simplehash.h

2022-11-04 Thread David Geier
On 11/3/22 15:50, Tom Lane wrote: Seems reasonable, so done (I fixed one additional spot you missed). Thanks! The bigger picture here is that we do actually endeavor to keep (most of) our headers C++ clean, but our tool cpluspluscheck misses these problems because it doesn't try to use these ma

Re: Add explicit casts in four places to simplehash.h

2022-11-03 Thread Tom Lane
David Geier writes: > What about, while not being strictly necessary for PostgreSQL itself, > also adding such casts to simplehash.h so that it can be used in code > where -Wc++-compat is enabled? Seems reasonable, so done (I fixed one additional spot you missed). The bigger picture here is th