Remove useless casts to (void *) - Mailing list pgsql-hackers

From Bertrand Drouvot
Subject Remove useless casts to (void *)
Date
Msg-id aR8Yv+uATLKbJCgI@ip-10-97-1-34.eu-west-3.compute.internal
Whole thread Raw
Responses Re: Remove useless casts to (void *)
List pgsql-hackers
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

Attachment

pgsql-hackers by date:

Previous
From: Aleksander Alekseev
Date:
Subject: Re: pg_utility ?
Next
From: Aleksander Alekseev
Date:
Subject: Re: 10% drop in code line count in PG 17