From ae03a7c7391dfc59f14226b7cfd8ef9f3390e56f Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Sun, 8 Aug 2021 22:05:42 +0200 Subject: Remove some unnecessary casts in format arguments We can use %zd or %zu directly, no need to cast to int. Conversely, some code was casting away from int when it could be using %d directly. --- src/backend/access/spgist/spgutils.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/backend/access/spgist/spgutils.c') diff --git a/src/backend/access/spgist/spgutils.c b/src/backend/access/spgist/spgutils.c index 9ff280a2526..03a9cd36e63 100644 --- a/src/backend/access/spgist/spgutils.c +++ b/src/backend/access/spgist/spgutils.c @@ -1240,8 +1240,8 @@ SpGistPageAddNewItem(SpGistState *state, Page page, Item item, Size size, *startOffset = offnum + 1; } else - elog(PANIC, "failed to add item of size %u to SPGiST index page", - (int) size); + elog(PANIC, "failed to add item of size %zu to SPGiST index page", + size); return offnum; } @@ -1252,8 +1252,8 @@ SpGistPageAddNewItem(SpGistState *state, Page page, Item item, Size size, InvalidOffsetNumber, false, false); if (offnum == InvalidOffsetNumber && !errorOK) - elog(ERROR, "failed to add item of size %u to SPGiST index page", - (int) size); + elog(ERROR, "failed to add item of size %zu to SPGiST index page", + size); return offnum; } -- cgit v1.2.3