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

Commit4e46726

Browse files
committed
Silence compiler warnings from some older compilers.
Sincea117ceb, some older gcc versions issue "variable may be useduninitialized in this function" complaints for brin_summarize_range.Silence that using the same coding pattern as in bt_index_check_internal;arguably,a117ceb had too narrow a view of which compilers might givetrouble.Nathan Bossart and Tom Lane. Back-patch as the previous commit was.Discussion:https://postgr.es/m/20220601163537.GA2331988@nathanxps13
1 parent1072e4c commit4e46726

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

‎contrib/amcheck/verify_nbtree.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ bt_index_check_internal(Oid indrelid, bool parentcheck, bool heapallindexed,
283283
else
284284
{
285285
heaprel=NULL;
286-
/*for "gcc -Og" https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78394 */
286+
/*Set these just to suppress "uninitialized variable" warnings */
287287
save_userid=InvalidOid;
288288
save_sec_context=-1;
289289
save_nestlevel=-1;

‎src/backend/access/brin/brin.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1053,7 +1053,13 @@ brin_summarize_range(PG_FUNCTION_ARGS)
10531053
save_nestlevel=NewGUCNestLevel();
10541054
}
10551055
else
1056+
{
10561057
heapRel=NULL;
1058+
/* Set these just to suppress "uninitialized variable" warnings */
1059+
save_userid=InvalidOid;
1060+
save_sec_context=-1;
1061+
save_nestlevel=-1;
1062+
}
10571063

10581064
indexRel=index_open(indexoid,ShareUpdateExclusiveLock);
10591065

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp