Skip to content

Commit 302612a

Browse files
committed
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.)
1 parent f79c94f commit 302612a

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

src/backend/access/heap/vacuumlazy.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1112,7 +1112,7 @@ lazy_scan_heap(LVRelState *vacrel, int nworkers)
11121112
if (lazy_scan_noprune(vacrel, buf, blkno, page, &hastup,
11131113
&recordfreespace))
11141114
{
1115-
Size freespace;
1115+
Size freespace = 0;
11161116

11171117
/*
11181118
* Processed page successfully (without cleanup lock) -- just

src/backend/replication/basebackup_lz4.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ bbsink_lz4_new(bbsink *next, int compresslevel)
6666
ereport(ERROR,
6767
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
6868
errmsg("lz4 compression is not supported by this build")));
69+
return NULL; /* keep compiler quiet */
6970
#else
7071
bbsink_lz4 *sink;
7172

src/bin/pg_rewind/parsexlog.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ static const char *RmgrNames[RM_MAX_ID + 1] = {
3838
static void extractPageInfo(XLogReaderState *record);
3939

4040
static int xlogreadfd = -1;
41-
static XLogSegNo xlogreadsegno = -1;
41+
static XLogSegNo xlogreadsegno = 0;
4242
static char xlogfpath[MAXPGPATH];
4343

4444
typedef struct XLogPageReadPrivate

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy