[postgis-tickets] [SCM] PostGIS branch master updated. 3.3.0rc2-393-g4dfc3f42e

git at osgeo.org git at osgeo.org
Tue Dec 13 17:43:13 PST 2022


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "PostGIS".

The branch, master has been updated
       via  4dfc3f42e1885bdb4d2d50a32e75a2479e991705 (commit)
      from  f0e94e2845427dbfb17773cc1f17c7ca777642b9 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 4dfc3f42e1885bdb4d2d50a32e75a2479e991705
Author: Paul Ramsey <pramsey at cleverelephant.ca>
Date:   Tue Dec 13 17:43:08 2022 -0800

    Fix compile warnings/errors against pg16devel

diff --git a/postgis/flatgeobuf.c b/postgis/flatgeobuf.c
index 545442f31..e98d6a65b 100644
--- a/postgis/flatgeobuf.c
+++ b/postgis/flatgeobuf.c
@@ -425,6 +425,9 @@ static void decode_properties(struct flatgeobuf_decode_ctx *ctx, Datum *values,
 			fsec_t fsec;
 			int tzp;
 			TimestampTz dttz;
+#if POSTGIS_PGSQL_VERSION >= 160
+			DateTimeErrorExtra extra;
+#endif
 			if (offset + sizeof(len) > size)
 				elog(ERROR, "flatgeobuf: decode_properties: Invalid size for string value");
 			memcpy(&len, data + offset, sizeof(uint32_t));
@@ -432,7 +435,12 @@ static void decode_properties(struct flatgeobuf_decode_ctx *ctx, Datum *values,
 			buf = palloc0(len + 1);
 			memcpy(buf, (const char *) data + offset, len);
 			ParseDateTime((const char *) buf, workbuf, sizeof(workbuf), field, ftype, MAXDATEFIELDS, &nf);
+
+#if POSTGIS_PGSQL_VERSION >= 160
+			DecodeDateTime(field, ftype, nf, &dtype, tm, &fsec, &tzp, &extra);
+#else
 			DecodeDateTime(field, ftype, nf, &dtype, tm, &fsec, &tzp);
+#endif
 			tm2timestamp(tm, fsec, &tzp, &dttz);
 			values[ci] = TimestampTzGetDatum(dttz);
 			offset += len;
diff --git a/postgis/gserialized_gist_2d.c b/postgis/gserialized_gist_2d.c
index 0d6a0e938..576c82838 100644
--- a/postgis/gserialized_gist_2d.c
+++ b/postgis/gserialized_gist_2d.c
@@ -1453,11 +1453,11 @@ fallbackSplit(GistEntryVector *entryvec, GIST_SPLITVEC *v)
 
 	if (v->spl_ldatum_exists)
 		adjustBox(unionL, (BOX2DF *) DatumGetPointer(v->spl_ldatum));
-	v->spl_ldatum = BoxPGetDatum(unionL);
+	v->spl_ldatum = PointerGetDatum(unionL);
 
 	if (v->spl_rdatum_exists)
 		adjustBox(unionR, (BOX2DF *) DatumGetPointer(v->spl_rdatum));
-	v->spl_rdatum = BoxPGetDatum(unionR);
+	v->spl_rdatum = PointerGetDatum(unionR);
 
 	v->spl_ldatum_exists = v->spl_rdatum_exists = false;
 }
diff --git a/postgis/gserialized_gist_nd.c b/postgis/gserialized_gist_nd.c
index 58c86e3d5..29b6472de 100644
--- a/postgis/gserialized_gist_nd.c
+++ b/postgis/gserialized_gist_nd.c
@@ -1508,7 +1508,7 @@ gserialized_gist_picksplit_constructsplit(GIST_SPLITVEC *v,
 		}
 		else
 		{
-			float p1, p2;
+			float p1 = 0.0, p2 = 0.0;
 			GISTENTRY oldUnion, addon;
 
 			gistentryinit(oldUnion,
diff --git a/postgis/gserialized_spgist_2d.c b/postgis/gserialized_spgist_2d.c
index 8ab682be3..098224a58 100644
--- a/postgis/gserialized_spgist_2d.c
+++ b/postgis/gserialized_spgist_2d.c
@@ -372,7 +372,7 @@ PGDLLEXPORT Datum gserialized_spgist_picksplit_2d(PG_FUNCTION_ARGS)
 
 	/* Fill the output */
 	out->hasPrefix = true;
-	out->prefixDatum = BoxPGetDatum(centroid);
+	out->prefixDatum = PointerGetDatum(centroid);
 
 	out->nNodes = 16;
 	out->nodeLabels = NULL; /* We don't need node labels. */
@@ -564,7 +564,7 @@ PGDLLEXPORT Datum gserialized_spgist_leaf_consistent_2d(PG_FUNCTION_ARGS)
 	int i;
 
 	/* Quick sanity check on entry key. */
-	if (DatumGetPointer(key) == NULL)
+	if (key == NULL)
 	{
 		POSTGIS_DEBUG(4, "[SPGIST] null index entry, returning false");
 		PG_RETURN_BOOL(false); /* NULL entry! */
diff --git a/postgis/lwgeom_box3d.c b/postgis/lwgeom_box3d.c
index 8aec40375..96288e624 100644
--- a/postgis/lwgeom_box3d.c
+++ b/postgis/lwgeom_box3d.c
@@ -464,7 +464,7 @@ PG_FUNCTION_INFO_V1(BOX3D_combine);
 Datum BOX3D_combine(PG_FUNCTION_ARGS)
 {
 	BOX3D *box = (BOX3D *)PG_GETARG_POINTER(0);
-	GSERIALIZED *geom = PG_ARGISNULL(1) ? NULL : (GSERIALIZED *)PG_DETOAST_DATUM(PG_GETARG_POINTER(1));
+	GSERIALIZED *geom = PG_ARGISNULL(1) ? NULL : (GSERIALIZED *)PG_DETOAST_DATUM(PG_GETARG_DATUM(1));
 	LWGEOM *lwgeom = NULL;
 	BOX3D *result = NULL;
 	GBOX gbox;
diff --git a/postgis/lwgeom_geos.c b/postgis/lwgeom_geos.c
index e481008d3..d94043d53 100644
--- a/postgis/lwgeom_geos.c
+++ b/postgis/lwgeom_geos.c
@@ -2477,8 +2477,7 @@ Datum relate_pattern(PG_FUNCTION_ARGS)
 		HANDLE_GEOS_ERROR("Second argument geometry could not be converted to GEOS");
 	}
 
-	patt =  DatumGetCString(DirectFunctionCall1(textout,
-	                        PointerGetDatum(PG_GETARG_DATUM(2))));
+	patt =  DatumGetCString(DirectFunctionCall1(textout, PG_GETARG_DATUM(2)));
 
 	/*
 	** Need to make sure 't' and 'f' are upper-case before handing to GEOS
diff --git a/postgis/lwgeom_triggers.c b/postgis/lwgeom_triggers.c
index 9df48c9af..4293637c4 100644
--- a/postgis/lwgeom_triggers.c
+++ b/postgis/lwgeom_triggers.c
@@ -110,8 +110,7 @@ Datum cache_bbox(PG_FUNCTION_ARGS)
 
 	if ( ! isnull )
 	{
-		out = PointerGetDatum(DirectFunctionCall1(LWGEOM_addBBOX, in));
-
+		out = DirectFunctionCall1(LWGEOM_addBBOX, in);
 		rettuple = SPI_modifytuple(trigdata->tg_relation, rettuple,
 		                           1, &attno, &out, NULL);
 	}
diff --git a/raster/rt_pg/rtpg_mapalgebra.c b/raster/rt_pg/rtpg_mapalgebra.c
index 8f278d5f5..b7010be6c 100644
--- a/raster/rt_pg/rtpg_mapalgebra.c
+++ b/raster/rt_pg/rtpg_mapalgebra.c
@@ -5904,7 +5904,7 @@ Datum RASTER_mapAlgebraFctNgb(PG_FUNCTION_ARGS)
     memcpy((void *)VARDATA(txtCallbackParam), (void *)VARDATA(txtNodataMode), VARSIZE(txtNodataMode) - VARHDRSZ);
 
     /* pass the nodata mode into the user function */
-    cbdata->args[1].value = CStringGetDatum(txtCallbackParam);
+    cbdata->args[1].value = PointerGetDatum(txtCallbackParam);
 
     strFromText = text_to_cstring(txtNodataMode);
     strFromText = rtpg_strtoupper(strFromText);

-----------------------------------------------------------------------

Summary of changes:
 postgis/flatgeobuf.c            | 8 ++++++++
 postgis/gserialized_gist_2d.c   | 4 ++--
 postgis/gserialized_gist_nd.c   | 2 +-
 postgis/gserialized_spgist_2d.c | 4 ++--
 postgis/lwgeom_box3d.c          | 2 +-
 postgis/lwgeom_geos.c           | 3 +--
 postgis/lwgeom_triggers.c       | 3 +--
 raster/rt_pg/rtpg_mapalgebra.c  | 2 +-
 8 files changed, 17 insertions(+), 11 deletions(-)


hooks/post-receive
-- 
PostGIS


More information about the postgis-tickets mailing list