From 0eadf1767ab8dec03135feaff8cd9e38881c1960 Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Sun, 4 Jan 2026 16:00:15 +0100 Subject: [PATCH] Remove bogus const qualifier on PageGetItem() argument The function ends up casting away the const qualifier, so it was a lie. No callers appear to rely on the const qualifier on the argument, so the simplest solution is to just remove it. Reviewed-by: Andres Freund Discussion: https://www.postgresql.org/message-id/beusplf77varvhip6ryuhd2fchsx26qmmhduqz432bnglq634b%402dx4k6yxj4cm --- src/include/storage/bufpage.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/include/storage/bufpage.h b/src/include/storage/bufpage.h index 52989e5e535..ae3725b3b81 100644 --- a/src/include/storage/bufpage.h +++ b/src/include/storage/bufpage.h @@ -351,12 +351,12 @@ PageValidateSpecialPointer(const PageData *page) * The semantics may change in the future. */ static inline void * -PageGetItem(const PageData *page, const ItemIdData *itemId) +PageGetItem(PageData *page, const ItemIdData *itemId) { Assert(page); Assert(ItemIdHasStorage(itemId)); - return (void *) (((const char *) page) + ItemIdGetOffset(itemId)); + return (char *) page + ItemIdGetOffset(itemId); } /*