From 52f63bd916184b5f07130c293475d0cf4f202a86 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Sat, 18 Nov 2017 16:46:29 -0500 Subject: [PATCH] Fix compiler warning in rangetypes_spgist.c. On gcc 7.2.0, comparing pointer to (Datum) 0 produces a warning. Treat it as a simple pointer to avoid that; this is more consistent with comparable code elsewhere, anyway. Tomas Vondra Discussion: https://postgr.es/m/99410021-61ef-9a9a-9bc8-f733ece637ee@2ndquadrant.com --- src/backend/utils/adt/rangetypes_spgist.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/backend/utils/adt/rangetypes_spgist.c b/src/backend/utils/adt/rangetypes_spgist.c index d934105d32..27fbf66433 100644 --- a/src/backend/utils/adt/rangetypes_spgist.c +++ b/src/backend/utils/adt/rangetypes_spgist.c @@ -556,7 +556,7 @@ spg_range_quad_inner_consistent(PG_FUNCTION_ARGS) * for lower or upper bounds to be adjacent. Deserialize * previous centroid range if present for checking this. */ - if (in->traversalValue != (Datum) 0) + if (in->traversalValue) { prevCentroid = DatumGetRangeTypeP(in->traversalValue); range_deserialize(typcache, prevCentroid, -- 2.40.0