pg.ddx.io pgsql-committers@postgresql.org mailing list archive
help / color / mirror / Atom feed From: Peter Eisentraut <peter@eisentraut.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Remove unneeded casts of BufferGetPage() result
Date: Fri, 29 Aug 2025 05:22:14 +0000
Message-ID: <E1urrYz-002BCk-22@gemulon.postgresql.org> (raw )
Remove unneeded casts of BufferGetPage() result
BufferGetPage() already returns type Page, so casting it to Page
doesn't achieve anything. A sizable number of call sites does this
casting; remove that.
This was already done inconsistently in the code in the first import
in 1996 (but didn't exist in the pre-1995 code), and it was then
apparently just copied around.
Author: Kirill Reshke <reshkekirill@gmail.com>
Reviewed-by: Chao Li <li.evan.chao@gmail.com>
Reviewed-by: Richard Guo <guofenglinux@gmail.com>
Reviewed-by: Álvaro Herrera <alvherre@kurilemu.de>
Reviewed-by: Peter Eisentraut <peter@eisentraut.org>
Discussion: https://www.postgresql.org/message-id/flat/CALdSSPgFhc5=vLqHdk-zCcnztC0zEY3EU_Q6a9vPEaw7FkE9Vw@mail....
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/710e6c4301ee3c739a171ea12ed141b1f8df0d93
Modified Files
--------------
contrib/amcheck/verify_gin.c | 4 ++--
contrib/bloom/blvacuum.c | 2 +-
contrib/pgstattuple/pgstatindex.c | 2 +-
contrib/pgstattuple/pgstattuple.c | 4 ++--
src/backend/access/brin/brin_xlog.c | 12 ++++++------
src/backend/access/gin/ginvacuum.c | 2 +-
src/backend/access/gin/ginxlog.c | 4 ++--
src/backend/access/gist/gist.c | 14 +++++++-------
src/backend/access/gist/gistbuild.c | 4 ++--
src/backend/access/gist/gistvacuum.c | 4 ++--
src/backend/access/gist/gistxlog.c | 10 +++++-----
src/backend/access/hash/hash_xlog.c | 18 +++++++++---------
src/backend/access/heap/heapam.c | 2 +-
src/backend/access/heap/heapam_handler.c | 2 +-
src/backend/access/heap/heapam_xlog.c | 8 ++++----
src/backend/access/heap/pruneheap.c | 2 +-
src/backend/access/heap/visibilitymap.c | 2 +-
src/backend/access/nbtree/nbtxlog.c | 28 ++++++++++++++--------------
src/backend/access/spgist/spgvacuum.c | 4 ++--
src/backend/access/spgist/spgxlog.c | 6 +++---
src/backend/access/transam/xlogutils.c | 2 +-
src/backend/commands/sequence.c | 2 +-
22 files changed, 69 insertions(+), 69 deletions(-)
Message-ID: <E1urrYz-002BCk-22@gemulon.postgresql.org>
Permalink: ../E1urrYz-002BCk-22@gemulon.postgresql.org/
Also on: postgresql.org/message-id/E1urrYz-002BCk-22@gemulon.postgresql.org
copy link · copy postgr.es
reply Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-committers@postgresql.org
Cc: peter@eisentraut.org, pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Remove unneeded casts of BufferGetPage() result
In-Reply-To: <E1urrYz-002BCk-22@gemulon.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox