Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 888671a

Browse filesBrowse 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
Copy full SHA for 888671a

File tree

Expand file treeCollapse file tree

1 file changed

+2
-2
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+2
-2
lines changed

‎src/bin/pg_checksums/pg_checksums.c

Copy file name to clipboardExpand all lines: src/bin/pg_checksums/pg_checksums.c
+2-2Lines 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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.