Opened 10 years ago

Closed 10 years ago

#2788 closed defect (fixed)

Warning on PG_RETURN_HEAPTUPLEHEADER building against PgSQL 9.4

Reported by: pramsey Owned by: pramsey
Priority: medium Milestone: PostGIS 2.1.4
Component: postgis Version: 2.1.x
Keywords: 9.4 Cc:

Description

gcc warns that PG_RETURN_HEAPTUPLEHEADER is getting the wrong arguments, and it looks like we are feeding it a Datum instead of a pointer to a HeapTupleHeader as we should be.

Change History (3)

comment:1 by robe, 10 years ago

Keywords: 9.4 added

comment:2 by robe, 10 years ago

ah I see it. Just to add this one is in building 2.2

lwgeom_geos.c: In function 'isvaliddetail':
lwgeom_geos.c:1901:2: warning: passing argument 1 of 'HeapTupleHeaderGetDatum' makes pointer from integer without a cast [enabled by default]
  PG_RETURN_HEAPTUPLEHEADER(result);
  ^
In file included from lwgeom_geos.c:24:0:
e:/jenkins/postgresql/rel/pg9.4w32gcc481/include/server/funcapi.h:232:14: note: expected 'HeapTupleHeader' but argument is of type 'Datum'
 extern Datum HeapTupleHeaderGetDatum(HeapTupleHeader tuple);

comment:3 by pramsey, 10 years ago

Resolution: fixed
Status: newclosed

I'm not sure why this function ever worked, given that it's returning a Datum pointing to the wrong kind of structure, but anyways, the fix I have works all the way back to 9.0, so I'm going to apply it to 2.1 and 2.2.

Committed to 2.1 in r12680 and trunk at r12681

Note: See TracTickets for help on using tickets.