mirror of
https://git.postgresql.org/git/postgresql.git
synced 2024-09-08 22:19:23 +02:00
pg_checksums: data_checksum_version is unsigned so use %u not %d
While the previous behavior didn't generate a warning, we might as well use an accurate *printf specification. Backpatch-through: 12
This commit is contained in:
parent
5f9b05ada1
commit
c50b6f7a9c
@ -634,7 +634,7 @@ main(int argc, char *argv[])
|
|||||||
if (mode == PG_MODE_CHECK)
|
if (mode == PG_MODE_CHECK)
|
||||||
{
|
{
|
||||||
printf(_("Bad checksums: %s\n"), psprintf(INT64_FORMAT, badblocks));
|
printf(_("Bad checksums: %s\n"), psprintf(INT64_FORMAT, badblocks));
|
||||||
printf(_("Data checksum version: %d\n"), ControlFile->data_checksum_version);
|
printf(_("Data checksum version: %u\n"), ControlFile->data_checksum_version);
|
||||||
|
|
||||||
if (badblocks > 0)
|
if (badblocks > 0)
|
||||||
exit(1);
|
exit(1);
|
||||||
@ -661,7 +661,7 @@ main(int argc, char *argv[])
|
|||||||
update_controlfile(DataDir, ControlFile, do_sync);
|
update_controlfile(DataDir, ControlFile, do_sync);
|
||||||
|
|
||||||
if (verbose)
|
if (verbose)
|
||||||
printf(_("Data checksum version: %d\n"), ControlFile->data_checksum_version);
|
printf(_("Data checksum version: %u\n"), ControlFile->data_checksum_version);
|
||||||
if (mode == PG_MODE_ENABLE)
|
if (mode == PG_MODE_ENABLE)
|
||||||
printf(_("Checksums enabled in cluster\n"));
|
printf(_("Checksums enabled in cluster\n"));
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user