summaryrefslogtreecommitdiff
path: root/contrib/amcheck
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2022-06-01 17:21:45 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2022-06-01 17:21:45 -0400
commitdd1c8dd1015f4548d6c29de56e54eda317b39319 (patch)
tree75683ff69f8de24b6b6d82efa72bd6baf333b68a /contrib/amcheck
parenteb39610f82679e015dd990a3fbba1c62e399c32a (diff)
downloadpostgresql-dd1c8dd1015f4548d6c29de56e54eda317b39319.tar.gz
Silence compiler warnings from some older compilers.
Since a117cebd6, 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
Diffstat (limited to 'contrib/amcheck')
-rw-r--r--contrib/amcheck/verify_nbtree.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/contrib/amcheck/verify_nbtree.c b/contrib/amcheck/verify_nbtree.c
index a8791000f8..2beeebb163 100644
--- a/contrib/amcheck/verify_nbtree.c
+++ b/contrib/amcheck/verify_nbtree.c
@@ -284,7 +284,7 @@ bt_index_check_internal(Oid indrelid, bool parentcheck, bool heapallindexed,
else
{
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_sec_context = -1;
save_nestlevel = -1;