Fix incorrect format placeholders

This commit is contained in:
Peter Eisentraut 2024-03-13 06:40:32 +01:00
parent a189ed49d6
commit 6612185883
2 changed files with 3 additions and 3 deletions

View File

@ -1277,8 +1277,8 @@ slurp_file(int fd, char *filename, StringInfo buf, int maxlen)
if (rb < 0)
pg_fatal("could not read file \"%s\": %m", filename);
else
pg_fatal("could not read file \"%s\": read only %d of %d bytes",
filename, (int) rb, (int) st.st_size);
pg_fatal("could not read file \"%s\": read only %zd of %lld bytes",
filename, rb, (long long int) st.st_size);
}
/* Adjust buffer length for new data and restore trailing-\0 invariant */

View File

@ -511,7 +511,7 @@ read_bytes(rfile *rf, void *buffer, unsigned length)
if (rb < 0)
pg_fatal("could not read file \"%s\": %m", rf->filename);
else
pg_fatal("could not read file \"%s\": read only %d of %d bytes",
pg_fatal("could not read file \"%s\": read only %d of %u bytes",
rf->filename, rb, length);
}
}