Skip to content

Commit 52f63bd

Browse files
committed
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
1 parent 4797f9b commit 52f63bd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/backend/utils/adt/rangetypes_spgist.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -556,7 +556,7 @@ spg_range_quad_inner_consistent(PG_FUNCTION_ARGS)
556556
* for lower or upper bounds to be adjacent. Deserialize
557557
* previous centroid range if present for checking this.
558558
*/
559-
if (in->traversalValue != (Datum) 0)
559+
if (in->traversalValue)
560560
{
561561
prevCentroid = DatumGetRangeTypeP(in->traversalValue);
562562
range_deserialize(typcache, prevCentroid,

0 commit comments

Comments
 (0)