mirror of
https://git.postgresql.org/git/postgresql.git
synced 2025-02-23 19:39:53 +08:00
Silence compiler warnings from some older compilers.
Sincea117cebd6
, some older gcc versions issue "variable may be used uninitialized in this function" complaints for brin_summarize_range. Silence that using the same coding pattern as in bt_index_check_internal; arguably,a117cebd6
had too narrow a view of which compilers might give trouble. Nathan Bossart and Tom Lane. Back-patch as the previous commit was. Discussion: https://postgr.es/m/20220601163537.GA2331988@nathanxps13
This commit is contained in:
parent
eb39610f82
commit
dd1c8dd101
@ -284,7 +284,7 @@ bt_index_check_internal(Oid indrelid, bool parentcheck, bool heapallindexed,
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
heaprel = NULL;
|
heaprel = NULL;
|
||||||
/* for "gcc -Og" https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78394 */
|
/* Set these just to suppress "uninitialized variable" warnings */
|
||||||
save_userid = InvalidOid;
|
save_userid = InvalidOid;
|
||||||
save_sec_context = -1;
|
save_sec_context = -1;
|
||||||
save_nestlevel = -1;
|
save_nestlevel = -1;
|
||||||
|
@ -1051,7 +1051,13 @@ brin_summarize_range(PG_FUNCTION_ARGS)
|
|||||||
save_nestlevel = NewGUCNestLevel();
|
save_nestlevel = NewGUCNestLevel();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
heapRel = NULL;
|
heapRel = NULL;
|
||||||
|
/* Set these just to suppress "uninitialized variable" warnings */
|
||||||
|
save_userid = InvalidOid;
|
||||||
|
save_sec_context = -1;
|
||||||
|
save_nestlevel = -1;
|
||||||
|
}
|
||||||
|
|
||||||
indexRel = index_open(indexoid, ShareUpdateExclusiveLock);
|
indexRel = index_open(indexoid, ShareUpdateExclusiveLock);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user