Skip to content

Commit f231a4e

Browse files
committed
Fix warning about wrong format specifier for off_t type
Per OS X buildfarm members.
1 parent bd8d9c9 commit f231a4e

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/bin/pg_upgrade/slru_io.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ SlruReadSwitchPageSlow(SlruSegState *state, uint64 pageno)
123123
rc = pg_pread(state->fd,
124124
&state->buf.data + bytes_read,
125125
BLCKSZ - bytes_read,
126-
offset + bytes_read);
126+
offset);
127127
if (rc < 0)
128128
{
129129
if (errno == EINTR)
@@ -133,12 +133,13 @@ SlruReadSwitchPageSlow(SlruSegState *state, uint64 pageno)
133133
if (rc == 0)
134134
{
135135
/* unexpected EOF */
136-
pg_log(PG_WARNING, "unexpected EOF reading file \"%s\" at offset %zd, reading as zeros", state->fn,
137-
offset + bytes_read);
136+
pg_log(PG_WARNING, "unexpected EOF reading file \"%s\" at offset %u, reading as zeros",
137+
state->fn, (unsigned int) offset);
138138
memset(&state->buf.data + bytes_read, 0, BLCKSZ - bytes_read);
139139
break;
140140
}
141141
bytes_read += rc;
142+
offset += rc;
142143
}
143144
state->pageno = pageno;
144145

0 commit comments

Comments
 (0)