mirror of
https://github.com/postgres/postgres.git
synced 2025-12-12 02:37:31 +03:00
Fix warning about wrong format specifier for off_t type
Per OS X buildfarm members.
This commit is contained in:
@@ -123,7 +123,7 @@ SlruReadSwitchPageSlow(SlruSegState *state, uint64 pageno)
|
|||||||
rc = pg_pread(state->fd,
|
rc = pg_pread(state->fd,
|
||||||
&state->buf.data + bytes_read,
|
&state->buf.data + bytes_read,
|
||||||
BLCKSZ - bytes_read,
|
BLCKSZ - bytes_read,
|
||||||
offset + bytes_read);
|
offset);
|
||||||
if (rc < 0)
|
if (rc < 0)
|
||||||
{
|
{
|
||||||
if (errno == EINTR)
|
if (errno == EINTR)
|
||||||
@@ -133,12 +133,13 @@ SlruReadSwitchPageSlow(SlruSegState *state, uint64 pageno)
|
|||||||
if (rc == 0)
|
if (rc == 0)
|
||||||
{
|
{
|
||||||
/* unexpected EOF */
|
/* unexpected EOF */
|
||||||
pg_log(PG_WARNING, "unexpected EOF reading file \"%s\" at offset %zd, reading as zeros", state->fn,
|
pg_log(PG_WARNING, "unexpected EOF reading file \"%s\" at offset %u, reading as zeros",
|
||||||
offset + bytes_read);
|
state->fn, (unsigned int) offset);
|
||||||
memset(&state->buf.data + bytes_read, 0, BLCKSZ - bytes_read);
|
memset(&state->buf.data + bytes_read, 0, BLCKSZ - bytes_read);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
bytes_read += rc;
|
bytes_read += rc;
|
||||||
|
offset += rc;
|
||||||
}
|
}
|
||||||
state->pageno = pageno;
|
state->pageno = pageno;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user