From 302612a6c74fb16f26d094ff47e9c59cf412740c Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Sun, 13 Feb 2022 13:06:55 -0500 Subject: Silence minor compiler warnings. Depending on compiler version and optimization level, we might get a complaint that lazy_scan_heap's "freespace" is used uninitialized. Compilers not aware that ereport(ERROR) doesn't return complained about bbsink_lz4_new(). Assigning "-1" to a uint64 value has unportable results; fortunately, the value of xlogreadsegno is unimportant when xlogreadfd is -1. (It looks to me like there is no need for xlogreadsegno to be static in the first place, but I didn't venture to change that.) --- src/backend/access/heap/vacuumlazy.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/backend/access') diff --git a/src/backend/access/heap/vacuumlazy.c b/src/backend/access/heap/vacuumlazy.c index d57055674ed..9c88b9bd71a 100644 --- a/src/backend/access/heap/vacuumlazy.c +++ b/src/backend/access/heap/vacuumlazy.c @@ -1112,7 +1112,7 @@ lazy_scan_heap(LVRelState *vacrel, int nworkers) if (lazy_scan_noprune(vacrel, buf, blkno, page, &hastup, &recordfreespace)) { - Size freespace; + Size freespace = 0; /* * Processed page successfully (without cleanup lock) -- just -- cgit v1.2.3