Avoid casting void * function arguments

Peter Eisentraut <peter@eisentraut.org>

Commit: c3c240537f6da498186bfb07017a7b01b9a2c24f
Author: Peter Eisentraut <peter@eisentraut.org>
Date: 2026-01-12T15:12:56Z
Avoid casting void * function arguments

In many cases, the cast would silently drop a const qualifier.  To
fix, drop the unnecessary cast and let the compiler check the types
and qualifiers.  Add const to read-only local variables, preserving
the const qualifiers from the function signatures.

Co-authored-by: Bertrand Drouvot <bertranddrouvot.pg@gmail.com>
Co-authored-by: Peter Eisentraut <peter@eisentraut.org>
Discussion: https://postgr.es/m/aUQHy/MmWq7c97wK%40ip-10-97-1-34.eu-west-3.compute.internal

Files

Discussion