Skip to content

Commit 888671a

Browse files
committed
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
1 parent f7f83a5 commit 888671a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/bin/pg_checksums/pg_checksums.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -635,7 +635,7 @@ main(int argc, char *argv[])
635635
if (mode == PG_MODE_CHECK)
636636
{
637637
printf(_("Bad checksums: %s\n"), psprintf(INT64_FORMAT, badblocks));
638-
printf(_("Data checksum version: %d\n"), ControlFile->data_checksum_version);
638+
printf(_("Data checksum version: %u\n"), ControlFile->data_checksum_version);
639639

640640
if (badblocks > 0)
641641
exit(1);
@@ -662,7 +662,7 @@ main(int argc, char *argv[])
662662
update_controlfile(DataDir, ControlFile, do_sync);
663663

664664
if (verbose)
665-
printf(_("Data checksum version: %d\n"), ControlFile->data_checksum_version);
665+
printf(_("Data checksum version: %u\n"), ControlFile->data_checksum_version);
666666
if (mode == PG_MODE_ENABLE)
667667
printf(_("Checksums enabled in cluster\n"));
668668
else

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy