Re: Add explicit casts in four places to simplehash.h
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: David Geier <geidav.pg@gmail.com>
Cc: PostgreSQL Developers <pgsql-hackers@lists.postgresql.org>
Date: 2022-11-03T14:50:18Z
Lists: pgsql-hackers
David Geier <geidav.pg@gmail.com> 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 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 better. regards, tom lane
Commits
-
Add casts to simplehash.h to silence C++ warnings.
- eeb5461e76ae 14.6 landed
- cf8b7d374ae1 16.0 landed
- 725cd4d2e481 15.1 landed
- 50467082c9d4 13.9 landed