aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2016-08-23 23:21:10 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2016-08-23 23:21:22 -0400
commit5c0b74240cb1f25a09b9b38d7cb665c0935a5d81 (patch)
treedec57b8ded06b4a29550eb825cf5952cc21f5b12
parentfcf1ed48ef0b2a92f903104160f792b5c10c6595 (diff)
downloadpostgresql-5c0b74240cb1f25a09b9b38d7cb665c0935a5d81.tar.gz
postgresql-5c0b74240cb1f25a09b9b38d7cb665c0935a5d81.zip
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.
-rw-r--r--src/backend/access/gist/gistutil.c2
-rw-r--r--src/backend/utils/adt/amutils.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/backend/access/gist/gistutil.c b/src/backend/access/gist/gistutil.c
index 26d4a646947..887c58b71c9 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 ad5e45674ba..f4844d15062 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;