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

Commit eec90ff

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 dffc82a commit eec90ff

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/bin/pg_checksums/pg_checksums.c

+2-2
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)