Don't rely on pointer arithmetic with Pointer type
authorPeter Eisentraut <[email protected]>
Wed, 3 Dec 2025 08:54:15 +0000 (09:54 +0100)
committerPeter Eisentraut <[email protected]>
Wed, 3 Dec 2025 08:54:15 +0000 (09:54 +0100)
commit756a43689324b473ee07549a6eb7a53a203df5ad
treeb72ab16ee77de3e82288c76c7b9493b93d378216
parent8c6bbd674ed810df9af5ec42f6b38c205e3ad365
Don't rely on pointer arithmetic with Pointer type

The comment for the Pointer type says 'XXX Pointer arithmetic is done
with this, so it can't be void * under "true" ANSI compilers.'.  This
fixes that.  Change from Pointer to use char * explicitly where
pointer arithmetic is needed.  This makes the meaning of the code
clearer locally and removes a dependency on the actual definition of
the Pointer type.  (The definition of the Pointer type is not changed
in this commit.)

Reviewed-by: Chao Li <[email protected]>
Reviewed-by: Bertrand Drouvot <[email protected]>
Discussion: https://www.postgresql.org/message-id/4154950a-47ae-4223-bd01-1235cc50e933%40eisentraut.org
contrib/bloom/bloom.h
contrib/bloom/blutils.c
contrib/bloom/blvacuum.c
src/backend/access/gin/gindatapage.c
src/backend/access/gin/ginxlog.c
src/backend/access/rmgrdesc/genericdesc.c
src/backend/utils/adt/multirangetypes.c
src/backend/utils/adt/rangetypes.c