Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit c50b6f7

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 5f9b05a commit c50b6f7

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
@@ -634,7 +634,7 @@ main(int argc, char *argv[])
634634
if (mode == PG_MODE_CHECK)
635635
{
636636
printf(_("Bad checksums: %s\n"), psprintf(INT64_FORMAT, badblocks));
637-
printf(_("Data checksum version: %d\n"), ControlFile->data_checksum_version);
637+
printf(_("Data checksum version: %u\n"), ControlFile->data_checksum_version);
638638

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

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

0 commit comments

Comments
 (0)