From: Tom Lane Date: Wed, 24 Aug 2016 03:21:10 +0000 (-0400) Subject: Suppress compiler warnings in non-cassert builds. X-Git-Tag: REL_10_BETA1~1829 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=71e006f031310f77ab72881c47a7d8f41df748bb;p=postgresql Suppress compiler warnings in non-cassert builds. With Asserts off, these variables are set but never used, resulting in warnings from pickier compilers. Fix that with our standard solution. Per report from Jeff Janes. --- diff --git a/src/backend/access/gist/gistutil.c b/src/backend/access/gist/gistutil.c index 26d4a64694..887c58b71c 100644 --- a/src/backend/access/gist/gistutil.c +++ b/src/backend/access/gist/gistutil.c @@ -852,7 +852,7 @@ gistproperty(Oid index_oid, int attno, bool *res, bool *isnull) { HeapTuple tuple; - Form_pg_index rd_index; + Form_pg_index rd_index PG_USED_FOR_ASSERTS_ONLY; Form_pg_opclass rd_opclass; Datum datum; bool disnull; diff --git a/src/backend/utils/adt/amutils.c b/src/backend/utils/adt/amutils.c index ad5e45674b..f4844d1506 100644 --- a/src/backend/utils/adt/amutils.c +++ b/src/backend/utils/adt/amutils.c @@ -115,7 +115,7 @@ test_indoption(Oid relid, int attno, bool guard, bool *res) { HeapTuple tuple; - Form_pg_index rd_index; + Form_pg_index rd_index PG_USED_FOR_ASSERTS_ONLY; Datum datum; bool isnull; int2vector *indoption;