Movatterモバイル変換


[0]ホーム

URL:


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

Sign up
Appearance settings

Commit302612a

Browse files
committed
Silence minor compiler warnings.
Depending on compiler version and optimization level, we mightget a complaint that lazy_scan_heap's "freespace" is useduninitialized.Compilers not aware that ereport(ERROR) doesn't return complainedabout 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 staticin the first place, but I didn't venture to change that.)
1 parentf79c94f commit302612a

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-
Sizefreespace;
1115+
Sizefreespace=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+
returnNULL;/* 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
staticvoidextractPageInfo(XLogReaderState*record);
3939

4040
staticintxlogreadfd=-1;
41-
staticXLogSegNoxlogreadsegno=-1;
41+
staticXLogSegNoxlogreadsegno=0;
4242
staticcharxlogfpath[MAXPGPATH];
4343

4444
typedefstructXLogPageReadPrivate

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp