pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Add casts to simplehash.h to silence C++ warnings.
4+ messages / 1 participants
[nested] [flat]

* pgsql: Add casts to simplehash.h to silence C++ warnings.
@ 2022-11-03 14:47 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 4+ messages in thread

From: Tom Lane @ 2022-11-03 14:47 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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
------
master

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

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



^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* pgsql: Add casts to simplehash.h to silence C++ warnings.
@ 2022-11-03 14:47 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 4+ messages in thread

From: Tom Lane @ 2022-11-03 14:47 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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_15_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/725cd4d2e4819056993ce32336ea130473eb02a1

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



^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* pgsql: Add casts to simplehash.h to silence C++ warnings.
@ 2022-11-03 14:47 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 4+ messages in thread

From: Tom Lane @ 2022-11-03 14:47 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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



^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* pgsql: Add casts to simplehash.h to silence C++ warnings.
@ 2022-11-03 14:47 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 4+ messages in thread

From: Tom Lane @ 2022-11-03 14:47 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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_13_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/50467082c9d44c1cb7d8fc105f65c37338d9a5a0

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



^ permalink  raw  reply  [nested|flat] 4+ messages in thread


end of thread, other threads:[~2022-11-03 14:47 UTC | newest]

Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2022-11-03 14:47 pgsql: Add casts to simplehash.h to silence C++ warnings. Tom Lane <tgl@sss.pgh.pa.us>
2022-11-03 14:47 pgsql: Add casts to simplehash.h to silence C++ warnings. Tom Lane <tgl@sss.pgh.pa.us>
2022-11-03 14:47 pgsql: Add casts to simplehash.h to silence C++ warnings. Tom Lane <tgl@sss.pgh.pa.us>
2022-11-03 14:47 pgsql: Add casts to simplehash.h to silence C++ warnings. Tom Lane <tgl@sss.pgh.pa.us>

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