Remove useless casts to (void *)
Bertrand Drouvot <bertranddrouvot.pg@gmail.com>
From: Bertrand Drouvot <bertranddrouvot.pg@gmail.com>
To: pgsql-hackers@lists.postgresql.org
Cc: Peter Eisentraut <peter@eisentraut.org>
Date: 2025-11-20T13:33:51Z
Lists: pgsql-hackers
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Remove useless casts to (void *)
- ef8fe693606a 19 (unreleased) landed
Attachments
- v1-0001-Remove-useless-casts-to-void.patch (text/x-diff)
Hi hackers, I was working on something similar to [1] (which led to 7f798aca1d5) and I think that 7f798aca1d5 missed removing some useless casts to (void *). Meaning, the ones in the attached patch in: - inval.c - bump.c - injection_point.c - copyfromparse.c - extension.c - wparser.c I did not find any reasons in the thread as to why those ones were not removed. The attached also remove casts that have been added since 7f798aca1d5, the ones in pg_publication.c, lock.c and tuplesortvariants.c. The patch has been generated with the help of the .cocci script [2] (though I manually reviewed and removed some matches that, I think, were not appropriate). [1]: https://www.postgresql.org/message-id/flat/461ea37c-8b58-43b4-9736-52884e862820%40eisentraut.org [2]: https://github.com/bdrouvot/coccinelle_on_pg/blob/main/misc/remove_useless_casts_to_void_star.cocci Regards, -- Bertrand Drouvot PostgreSQL Contributors Team RDS Open Source Databases Amazon Web Services: https://aws.amazon.com