summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHeikki Linnakangas2025-12-09 12:05:13 +0000
committerHeikki Linnakangas2025-12-09 12:05:13 +0000
commitf231a4e8c7f2ce93203cedea7a02ef3eeb744647 (patch)
treefbc882cd321bb1f00778b366fc5062183eec963d
parentbd8d9c9bdfa0c2168bb37edca6fa88168cacbbaa (diff)
Fix warning about wrong format specifier for off_t type
Per OS X buildfarm members.
-rw-r--r--src/bin/pg_upgrade/slru_io.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/bin/pg_upgrade/slru_io.c b/src/bin/pg_upgrade/slru_io.c
index 812a241fe62..0862cd33e6c 100644
--- a/src/bin/pg_upgrade/slru_io.c
+++ b/src/bin/pg_upgrade/slru_io.c
@@ -123,7 +123,7 @@ SlruReadSwitchPageSlow(SlruSegState *state, uint64 pageno)
rc = pg_pread(state->fd,
&state->buf.data + bytes_read,
BLCKSZ - bytes_read,
- offset + bytes_read);
+ offset);
if (rc < 0)
{
if (errno == EINTR)
@@ -133,12 +133,13 @@ SlruReadSwitchPageSlow(SlruSegState *state, uint64 pageno)
if (rc == 0)
{
/* unexpected EOF */
- pg_log(PG_WARNING, "unexpected EOF reading file \"%s\" at offset %zd, reading as zeros", state->fn,
- offset + bytes_read);
+ pg_log(PG_WARNING, "unexpected EOF reading file \"%s\" at offset %u, reading as zeros",
+ state->fn, (unsigned int) offset);
memset(&state->buf.data + bytes_read, 0, BLCKSZ - bytes_read);
break;
}
bytes_read += rc;
+ offset += rc;
}
state->pageno = pageno;