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

Commitdd1c8dd

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 parenteb39610 commitdd1c8dd

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
@@ -284,7 +284,7 @@ bt_index_check_internal(Oid indrelid, bool parentcheck, bool heapallindexed,
284284
else
285285
{
286286
heaprel=NULL;
287-
/*for "gcc -Og" https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78394 */
287+
/*Set these just to suppress "uninitialized variable" warnings */
288288
save_userid=InvalidOid;
289289
save_sec_context=-1;
290290
save_nestlevel=-1;

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1051,7 +1051,13 @@ brin_summarize_range(PG_FUNCTION_ARGS)
10511051
save_nestlevel=NewGUCNestLevel();
10521052
}
10531053
else
1054+
{
10541055
heapRel=NULL;
1056+
/* Set these just to suppress "uninitialized variable" warnings */
1057+
save_userid=InvalidOid;
1058+
save_sec_context=-1;
1059+
save_nestlevel=-1;
1060+
}
10551061

10561062
indexRel=index_open(indexoid,ShareUpdateExclusiveLock);
10571063

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp