summaryrefslogtreecommitdiff
path: root/src/bin/pg_waldump/pg_waldump.c
diff options
context:
space:
mode:
authorPeter Eisentraut2021-08-08 20:05:42 +0000
committerPeter Eisentraut2021-08-08 20:08:07 +0000
commitae03a7c7391dfc59f14226b7cfd8ef9f3390e56f (patch)
treedb2f552b8fa261422d71541acb7a257735697b1d /src/bin/pg_waldump/pg_waldump.c
parentcf5ce5aa70d33fc3048ab63c50585b8cc0f11dfd (diff)
Remove some unnecessary casts in format arguments
We can use %zd or %zu directly, no need to cast to int. Conversely, some code was casting away from int when it could be using %d directly.
Diffstat (limited to 'src/bin/pg_waldump/pg_waldump.c')
-rw-r--r--src/bin/pg_waldump/pg_waldump.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/bin/pg_waldump/pg_waldump.c b/src/bin/pg_waldump/pg_waldump.c
index 74664bef6a4..1e3894b9c45 100644
--- a/src/bin/pg_waldump/pg_waldump.c
+++ b/src/bin/pg_waldump/pg_waldump.c
@@ -211,8 +211,8 @@ search_directory(const char *directory, const char *fname)
fatal_error("could not read file \"%s\": %m",
fname);
else
- fatal_error("could not read file \"%s\": read %d of %zu",
- fname, r, (Size) XLOG_BLCKSZ);
+ fatal_error("could not read file \"%s\": read %d of %d",
+ fname, r, XLOG_BLCKSZ);
}
close(fd);
return true;
@@ -369,9 +369,9 @@ WALDumpReadPage(XLogReaderState *state, XLogRecPtr targetPagePtr, int reqLen,
fname, errinfo.wre_off);
}
else
- fatal_error("could not read from file %s, offset %u: read %d of %zu",
+ fatal_error("could not read from file %s, offset %u: read %d of %d",
fname, errinfo.wre_off, errinfo.wre_read,
- (Size) errinfo.wre_req);
+ errinfo.wre_req);
}
return count;