Re: Remove useless casts to (void *)

Bertrand Drouvot <bertranddrouvot.pg@gmail.com>

From: Bertrand Drouvot <bertranddrouvot.pg@gmail.com>
To: Álvaro Herrera <alvherre@kurilemu.de>
Cc: Aleksander Alekseev <aleksander@tigerdata.com>, pgsql-hackers@lists.postgresql.org, Peter Eisentraut <peter@eisentraut.org>
Date: 2025-11-20T17:13:15Z
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 →
  1. Remove useless casts to (void *)

Hi,

On Thu, Nov 20, 2025 at 04:43:58PM +0100, Álvaro Herrera wrote:
> On 2025-Nov-20, Aleksander Alekseev wrote:
> 
> > IMO what actually is important is for the code to be consistent.
> 
> IMO what is most important is that the code is correct.  Second most
> important is that the code is performant.  The consistency is perhaps a
> third priority, if that -- there may be other objectives that are also
> more important than consistency.

Yeah, I was convinced by the discussion in [1], so spent some time to be able
to detect kind of automatically those useless casts.

[1]: https://www.postgresql.org/message-id/flat/461ea37c-8b58-43b4-9736-52884e862820@eisentraut.org

Regards,

-- 
Bertrand Drouvot
PostgreSQL Contributors Team
RDS Open Source Databases
Amazon Web Services: https://aws.amazon.com