[postgis-tickets] [SCM] PostGIS branch master updated. 3.3.0rc2-1015-g9401093fc

git at osgeo.org git at osgeo.org
Tue Jun 27 09:45:45 PDT 2023


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  9401093fc80073ae294d312a99be7338ceac7f66 (commit)
      from  503f99fcd4ad3119dd1ae206b841e710129e00f2 (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 9401093fc80073ae294d312a99be7338ceac7f66
Author: Regina Obe <lr at pcorp.us>
Date:   Tue Jun 27 12:40:15 2023 -0400

    FIX GHA 16 latest warnings
    Closes #5278 for PostGIS 3.4.0
    
     - Turn back on warnings notices on latest (switch back tests mode)
     - Fix shadow warnings on gserialized gist c files
     - Fix shawow warning on mvt
     - Fix double-free warning on address_standardizer
     - Fix strncopy length depends on bounds of source instead of dest

diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index a0614a2cd..c5dbf6498 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -27,7 +27,7 @@ jobs:
         - { tag: pg13-geos39-gdal31-proj71, mode: usan_gcc }
         - { tag: pg13-clang-geos39-gdal31-proj71, mode: usan_clang }
         # Run tests with different dependency combinations
-        - { tag: latest, mode: coverage }
+        - { tag: latest, mode: tests }
         - { tag: pg13-geos38-gdal31-proj71, mode: tests }
         - { tag: pg12-geos37-gdal30-proj611, mode: tests }
 
diff --git a/ci/github/run_tests.sh b/ci/github/run_tests.sh
index 63fe9948f..c7323f55b 100644
--- a/ci/github/run_tests.sh
+++ b/ci/github/run_tests.sh
@@ -2,7 +2,7 @@
 set -e
 
 WARNINGS="-Werror -Wall -Wextra -Wformat -Werror=format-security"
-WARNINGS_DISABLED="-Wno-unused-parameter -Wno-implicit-fallthrough -Wno-unknown-warning-option -Wno-cast-function-type"
+WARNINGS_DISABLED="-Wno-unused-parameter -Wno-implicit-fallthrough -Wno-cast-function-type"
 
 # Standard flags, as we might build PostGIS for production
 CFLAGS_STD="-g -O2 -mtune=generic -fno-omit-frame-pointer ${WARNINGS} ${WARNINGS_DISABLED}"
diff --git a/extensions/address_standardizer/gamma.c b/extensions/address_standardizer/gamma.c
index dcb16f7d0..413d957a9 100644
--- a/extensions/address_standardizer/gamma.c
+++ b/extensions/address_standardizer/gamma.c
@@ -162,7 +162,6 @@ RULES *rules_init( ERR_PARAM *err_p ) {
        rules -> Trie = NULL;
 
        rules_free(rules);
-       FREE_AND_NULL(rules);
 
        return NULL ;
     }
diff --git a/loader/shp2pgsql-core.c b/loader/shp2pgsql-core.c
index 67e9eae00..a7a290c87 100644
--- a/loader/shp2pgsql-core.c
+++ b/loader/shp2pgsql-core.c
@@ -1173,9 +1173,10 @@ ShpLoaderOpenShape(SHPLOADERSTATE *state)
 		        ! strcmp(name, "oid") || ! strcmp(name, "ctid"))
 		{
 			size_t len = strlen(name);
-			if (len > (MAXFIELDNAMELEN - 2))
+			if (len > (MAXFIELDNAMELEN - 2)){
 				len = MAXFIELDNAMELEN - 2;
-			strncpy(name2 + 2, name, len);
+			}
+			strncpy(name2 + 2, name, MAXFIELDNAMELEN - 2);
 			name2[MAXFIELDNAMELEN-1] = '\0';
 			name2[len + 2] = '\0';
 			name2[0] = '_';
diff --git a/postgis/gserialized_estimate.c b/postgis/gserialized_estimate.c
index b39ef47b4..bc1983ff5 100644
--- a/postgis/gserialized_estimate.c
+++ b/postgis/gserialized_estimate.c
@@ -1722,7 +1722,6 @@ compute_gserialized_stats_mode(VacAttrStats *stats, AnalyzeAttrFetchFunc fetchfu
 		const ND_BOX *nd_box;
 		ND_IBOX nd_ibox;
 		int at[ND_DIMS];
-		int d;
 		double num_cells = 0;
 		double min[ND_DIMS] = {0.0, 0.0, 0.0, 0.0};
 		double max[ND_DIMS] = {0.0, 0.0, 0.0, 0.0};
diff --git a/postgis/gserialized_spgist_3d.c b/postgis/gserialized_spgist_3d.c
index dfdc8fc5d..9704fe831 100644
--- a/postgis/gserialized_spgist_3d.c
+++ b/postgis/gserialized_spgist_3d.c
@@ -424,6 +424,7 @@ PGDLLEXPORT Datum gserialized_spgist_picksplit_3d(PG_FUNCTION_ARGS)
 	spgPickSplitOut *out = (spgPickSplitOut *)PG_GETARG_POINTER(1);
 	BOX3D *centroid;
 	int median, i;
+	uint8 octant;
 	double *lowXs = palloc(sizeof(double) * in->nTuples);
 	double *highXs = palloc(sizeof(double) * in->nTuples);
 	double *lowYs = palloc(sizeof(double) * in->nTuples);
@@ -436,7 +437,7 @@ PGDLLEXPORT Datum gserialized_spgist_picksplit_3d(PG_FUNCTION_ARGS)
 	/* Calculate median of all 6D coordinates */
 	for (i = 0; i < in->nTuples; i++)
 	{
-		BOX3D *box = DatumGetBox3DP(in->datums[i]);
+		box = DatumGetBox3DP(in->datums[i]);
 
 		lowXs[i] = box->xmin;
 		highXs[i] = box->xmax;
@@ -481,8 +482,8 @@ PGDLLEXPORT Datum gserialized_spgist_picksplit_3d(PG_FUNCTION_ARGS)
 	 */
 	for (i = 0; i < in->nTuples; i++)
 	{
-		BOX3D *box = DatumGetBox3DP(in->datums[i]);
-		uint8 octant = getOctant(centroid, box);
+		box = DatumGetBox3DP(in->datums[i]);
+		octant = getOctant(centroid, box);
 
 		out->leafTupleDatums[i] = Box3DPGetDatum(box);
 		out->mapTuplesToNodes[i] = octant;
diff --git a/postgis/gserialized_spgist_nd.c b/postgis/gserialized_spgist_nd.c
index 742478308..4dc417611 100644
--- a/postgis/gserialized_spgist_nd.c
+++ b/postgis/gserialized_spgist_nd.c
@@ -314,7 +314,7 @@ PGDLLEXPORT Datum gserialized_spgist_picksplit_nd(PG_FUNCTION_ARGS)
 {
 	spgPickSplitIn *in = (spgPickSplitIn *)PG_GETARG_POINTER(0);
 	spgPickSplitOut *out = (spgPickSplitOut *)PG_GETARG_POINTER(1);
-	GIDX *box, *centroid;
+	GIDX *centroid;
 	float *lowXs, *highXs;
 	int ndims, maxdims = -1, count[GIDX_MAX_DIM], median, dim, tuple;
 
@@ -327,7 +327,7 @@ PGDLLEXPORT Datum gserialized_spgist_picksplit_nd(PG_FUNCTION_ARGS)
 	/* Calculate maxdims median of all ND coordinates */
 	for (tuple = 0; tuple < in->nTuples; tuple++)
 	{
-		box = (GIDX *)DatumGetPointer(in->datums[tuple]);
+		GIDX *box = (GIDX *)DatumGetPointer(in->datums[tuple]);
 		ndims = GIDX_NDIMS(box);
 		if (maxdims < ndims)
 			maxdims = ndims;
diff --git a/postgis/mvt.c b/postgis/mvt.c
index dc9426303..d35514952 100644
--- a/postgis/mvt.c
+++ b/postgis/mvt.c
@@ -1109,7 +1109,7 @@ static bytea *mvt_ctx_to_bytea(mvt_agg_context *ctx)
 	/* Zero features => empty bytea output */
 	if (ctx && ctx->layer && ctx->layer->n_features == 0)
 	{
-		bytea *ba = palloc(VARHDRSZ);
+		ba = palloc(VARHDRSZ);
 		SET_VARSIZE(ba, VARHDRSZ);
 		return ba;
 	}

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

Summary of changes:
 .github/workflows/ci.yml                | 2 +-
 ci/github/run_tests.sh                  | 2 +-
 extensions/address_standardizer/gamma.c | 1 -
 loader/shp2pgsql-core.c                 | 5 +++--
 postgis/gserialized_estimate.c          | 1 -
 postgis/gserialized_spgist_3d.c         | 7 ++++---
 postgis/gserialized_spgist_nd.c         | 4 ++--
 postgis/mvt.c                           | 2 +-
 8 files changed, 12 insertions(+), 12 deletions(-)


hooks/post-receive
-- 
PostGIS


More information about the postgis-tickets mailing list