aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomas Vondra <tomas.vondra@postgresql.org>2024-04-05 18:13:15 +0200
committerTomas Vondra <tomas.vondra@postgresql.org>2024-04-05 18:13:15 +0200
commit8e392595e5619734db707553e8f72dfacf9ab86c (patch)
treec993a95cd71d7321e2b5a3de509971dd2c4f54ba
parentf8ce4ed78ca6e35bf135545e34bd49cd65d88ea2 (diff)
downloadpostgresql-8e392595e5619734db707553e8f72dfacf9ab86c.tar.gz
postgresql-8e392595e5619734db707553e8f72dfacf9ab86c.zip
Remove unused variable in checksum_file()
The 'offset' variable was set but otherwise unused. Per buildfarm animals with clang, e.g. sifaka and longlin.
-rw-r--r--src/bin/pg_combinebackup/copy_file.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/src/bin/pg_combinebackup/copy_file.c b/src/bin/pg_combinebackup/copy_file.c
index 844896d66eb..b00266cde54 100644
--- a/src/bin/pg_combinebackup/copy_file.c
+++ b/src/bin/pg_combinebackup/copy_file.c
@@ -126,7 +126,6 @@ checksum_file(const char *src, pg_checksum_context *checksum_ctx)
uint8 *buffer;
const int buffer_size = 50 * BLCKSZ;
ssize_t rb;
- unsigned offset = 0;
/* bail out if no checksum needed */
if (checksum_ctx->type == CHECKSUM_TYPE_NONE)
@@ -141,8 +140,6 @@ checksum_file(const char *src, pg_checksum_context *checksum_ctx)
{
if (pg_checksum_update(checksum_ctx, buffer, rb) < 0)
pg_fatal("could not update checksum of file \"%s\"", src);
-
- offset += rb;
}
if (rb < 0)