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

Commit60ca2e8

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 parenteeac7dd commit60ca2e8

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

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -911,7 +911,13 @@ brin_summarize_range(PG_FUNCTION_ARGS)
911911
save_nestlevel=NewGUCNestLevel();
912912
}
913913
else
914+
{
914915
heapRel=NULL;
916+
/* Set these just to suppress "uninitialized variable" warnings */
917+
save_userid=InvalidOid;
918+
save_sec_context=-1;
919+
save_nestlevel=-1;
920+
}
915921

916922
indexRel=index_open(indexoid,ShareUpdateExclusiveLock);
917923

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp