From: Andres Freund Date: Wed, 1 May 2019 00:45:32 +0000 (-0700) Subject: Fix unused variable compiler warning in !debug builds. X-Git-Tag: REL_11_3~16 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d264bb51c5ad12708394725eab14dae7be5c0b59;p=thirdparty%2Fpostgresql.git Fix unused variable compiler warning in !debug builds. Introduced in 3dbb317d3. Fix by using the new local variable in more places. Reported-By: Bruce Momjian (off-list) Backpatch: 9.4-, like 3dbb317d3 --- diff --git a/src/backend/catalog/indexing.c b/src/backend/catalog/indexing.c index f50660e8c3d..a5f5bc46a93 100644 --- a/src/backend/catalog/indexing.c +++ b/src/backend/catalog/indexing.c @@ -136,7 +136,7 @@ CatalogIndexInsert(CatalogIndexState indstate, HeapTuple heapTuple) Assert(!ReindexIsProcessingIndex(RelationGetRelid(index))); continue; } -#endif /* USE_ASSERT_CHECKING */ +#endif /* USE_ASSERT_CHECKING */ /* * FormIndexDatum fills in its values and isnull parameters with the @@ -151,12 +151,12 @@ CatalogIndexInsert(CatalogIndexState indstate, HeapTuple heapTuple) /* * The index AM does the rest. */ - index_insert(relationDescs[i], /* index relation */ + index_insert(index, /* index relation */ values, /* array of index Datums */ isnull, /* is-null flags */ &(heapTuple->t_self), /* tid of heap tuple */ heapRelation, - relationDescs[i]->rd_index->indisunique ? + index->rd_index->indisunique ? UNIQUE_CHECK_YES : UNIQUE_CHECK_NO, indexInfo); }