aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>2020-12-01 20:27:06 -0500
committerBruce Momjian <bruce@momjian.us>2020-12-01 20:27:06 -0500
commiteec90ffbf86f77102e0238b39591a26667cab0db (patch)
treea6d80af29f01fe7b5534c0ebb28c3d092a21a8af /src
parentdffc82a5b9d48bded63e1beed718b24bbf58c6a4 (diff)
downloadpostgresql-eec90ffbf86f77102e0238b39591a26667cab0db.tar.gz
postgresql-eec90ffbf86f77102e0238b39591a26667cab0db.zip
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
Diffstat (limited to 'src')
-rw-r--r--src/bin/pg_checksums/pg_checksums.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/bin/pg_checksums/pg_checksums.c b/src/bin/pg_checksums/pg_checksums.c
index ffdc23945c6..28aba92a4c3 100644
--- a/src/bin/pg_checksums/pg_checksums.c
+++ b/src/bin/pg_checksums/pg_checksums.c
@@ -635,7 +635,7 @@ main(int argc, char *argv[])
if (mode == PG_MODE_CHECK)
{
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)
exit(1);
@@ -662,7 +662,7 @@ main(int argc, char *argv[])
update_controlfile(DataDir, ControlFile, do_sync);
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)
printf(_("Checksums enabled in cluster\n"));
else