[postgis-tickets] [SCM] PostGIS branch stable-3.3 updated. 3.3.3-25-g6aa0f6be9

git at osgeo.org git at osgeo.org
Wed Jul 12 12:52:32 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, stable-3.3 has been updated
       via  6aa0f6be9fff0490600c67121ee8fcb02ec27426 (commit)
      from  d4bd1994ba52c6a978a22454c6cea9dd20af9160 (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 6aa0f6be9fff0490600c67121ee8fcb02ec27426
Author: Paul Ramsey <pramsey at cleverelephant.ca>
Date:   Wed Jul 12 12:52:18 2023 -0700

    Cleasn up some build warnings.

diff --git a/extensions/address_standardizer/pagc_std_api.h b/extensions/address_standardizer/pagc_std_api.h
index 2e0429386..73ca90a02 100644
--- a/extensions/address_standardizer/pagc_std_api.h
+++ b/extensions/address_standardizer/pagc_std_api.h
@@ -45,12 +45,12 @@ typedef struct STDADDR_s {  // define as required
    char *unit;
 } STDADDR;
 
-LEXICON * lex_init();
+LEXICON * lex_init(ERR_PARAM *err_p);
 int lex_add_entry(LEXICON *lex, int seq, char *word, char
 *stdword, SYMB token);
 void lex_free(LEXICON *lex);
 
-RULES *rules_init();
+RULES *rules_init(ERR_PARAM *err_p);
 int rules_add_rule(RULES *rules, int num, int *rule);
 int rules_add_rule_from_str(RULES *rules, char *rule);
 int rules_ready(RULES *rules);
diff --git a/extensions/address_standardizer/parseaddress-api.c b/extensions/address_standardizer/parseaddress-api.c
index f88f830c1..53f27d786 100644
--- a/extensions/address_standardizer/parseaddress-api.c
+++ b/extensions/address_standardizer/parseaddress-api.c
@@ -170,7 +170,7 @@ ADDRESS *parseaddress(HHash *stH, char *s, int *reterr)
     char *caregx;
     char *state = NULL;
     char *regx;
-    int mi;
+    int mi = 0;
     size_t ui, uj;
     int rc;
     ADDRESS *ret;
@@ -331,7 +331,7 @@ ADDRESS *parseaddress(HHash *stH, char *s, int *reterr)
     rc = match((char *)regx, s, ovect, 0);
     if (rc <= 0) {
         /* look for state specific regex */
-        mi++;
+        mi = mi + 1;
         regx = (char *) get_state_regex(ret->st);
         if (regx)
             rc = match((char *)regx, s, ovect, 0);
@@ -339,7 +339,7 @@ ADDRESS *parseaddress(HHash *stH, char *s, int *reterr)
     DBG("Checked for comma: %d", rc);
     if (rc <= 0 && ret->st && strlen(ret->st)) {
         /* look for state specific regex */
-        mi++;
+        mi = mi + 1;
         regx = (char *) get_state_regex(ret->st);
         if (regx)
             rc = match((char *)regx, s, ovect, 0);
@@ -349,7 +349,7 @@ ADDRESS *parseaddress(HHash *stH, char *s, int *reterr)
         int i;
         /* run through the regx's and see if we get a match */
         for (i=0; i<nreg; i++) {
-            mi++;
+            mi = mi + 1;
             rc = match((char *)t_regx[i], s, ovect, 0);
             DBG("    rc=%d, i=%d", rc, i);
             if (rc > 0) break;
diff --git a/liblwgeom/lwgeom_topo.c b/liblwgeom/lwgeom_topo.c
index 26ca766a0..df573fdde 100644
--- a/liblwgeom/lwgeom_topo.c
+++ b/liblwgeom/lwgeom_topo.c
@@ -5728,7 +5728,7 @@ _lwt_AddLine(LWT_TOPOLOGY* topo, LWLINE* line, double tol, int* nedges,
         continue;
       }
       nearby[nearbyindex++] = g;
-      ++nn;
+      nn = nn + 1;
     }
     LWDEBUGF(1, "Found %d isolated nodes closer than tolerance (%g)", nn, tol);
   }}
diff --git a/loader/shp2pgsql-core.c b/loader/shp2pgsql-core.c
index 036880e5c..668ffb450 100644
--- a/loader/shp2pgsql-core.c
+++ b/loader/shp2pgsql-core.c
@@ -657,7 +657,7 @@ GeneratePolygonGeometry(SHPLOADERSTATE *state, SHPObject *obj, char **geometry)
 		polyring = Outer[pi];
 		while (polyring)
 		{
-			ring_total++;
+			ring_total = ring_total + 1;
 			polyring = polyring->next;
 		}
 
@@ -687,7 +687,7 @@ GeneratePolygonGeometry(SHPLOADERSTATE *state, SHPObject *obj, char **geometry)
 			lwpoly_add_ring(lwpoly, pa);
 
 			polyring = polyring->next;
-			ring_index++;
+			ring_index = ring_index + 1;
 		}
 
 		/* Generate the LWGEOM */
diff --git a/postgis/gserialized_estimate.c b/postgis/gserialized_estimate.c
index 56c685dfc..6988f53e9 100644
--- a/postgis/gserialized_estimate.c
+++ b/postgis/gserialized_estimate.c
@@ -1525,7 +1525,11 @@ compute_gserialized_stats_mode(VacAttrStats *stats, AnalyzeAttrFetchFunc fetchfu
 	 * we have an average of 5 features for each cell so the histogram isn't
 	 * so sparse.
 	 */
+#if POSTGIS_PGSQL_VERSION >= 170
+	histo_cells_target = (int)pow((double)(stats->attstattarget), (double)ndims);
+#else
 	histo_cells_target = (int)pow((double)(stats->attr->attstattarget), (double)ndims);
+#endif
 	histo_cells_target = Min(histo_cells_target, ndims * 10000);
 	histo_cells_target = Min(histo_cells_target, (int)(total_rows/5));
 	POSTGIS_DEBUGF(3, " stats->attr->attstattarget: %d", stats->attr->attstattarget);
@@ -1534,16 +1538,6 @@ compute_gserialized_stats_mode(VacAttrStats *stats, AnalyzeAttrFetchFunc fetchfu
 	/* If there's no useful features, we can't work out stats */
 	if ( ! notnull_cnt )
 	{
-#if POSTGIS_DEBUG_LEVEL > 0
-		Oid relation_oid = stats->attr->attrelid;
-		char *relation_name = get_rel_name(relation_oid);
-		char *namespace = get_namespace_name(get_rel_namespace(relation_oid));
-		elog(DEBUG1,
-		     "PostGIS: Unable to compute statistics for \"%s.%s.%s\": No non-null/empty features",
-		     namespace ? namespace : "(NULL)",
-		     relation_name ? relation_name : "(NULL)",
-		     stats->attr->attname.data);
-#endif /* POSTGIS_DEBUG_LEVEL > 0 */
 		stats->stats_valid = false;
 		return;
 	}
@@ -1729,7 +1723,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..4f1fbb849 100644
--- a/postgis/gserialized_spgist_3d.c
+++ b/postgis/gserialized_spgist_3d.c
@@ -436,14 +436,14 @@ 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]);
-
-		lowXs[i] = box->xmin;
-		highXs[i] = box->xmax;
-		lowYs[i] = box->ymin;
-		highYs[i] = box->ymax;
-		lowZs[i] = box->zmin;
-		highZs[i] = box->zmax;
+		BOX3D *b = DatumGetBox3DP(in->datums[i]);
+
+		lowXs[i] = b->xmin;
+		highXs[i] = b->xmax;
+		lowYs[i] = b->ymin;
+		highYs[i] = b->ymax;
+		lowZs[i] = b->zmin;
+		highZs[i] = b->zmax;
 	}
 
 	qsort(lowXs, in->nTuples, sizeof(double), compareDoubles);
@@ -481,10 +481,10 @@ 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);
+		BOX3D *b = DatumGetBox3DP(in->datums[i]);
+		uint8 octant = getOctant(centroid, b);
 
-		out->leafTupleDatums[i] = Box3DPGetDatum(box);
+		out->leafTupleDatums[i] = Box3DPGetDatum(b);
 		out->mapTuplesToNodes[i] = octant;
 	}
 
diff --git a/postgis/mvt.c b/postgis/mvt.c
index dc9426303..3ae5990f1 100644
--- a/postgis/mvt.c
+++ b/postgis/mvt.c
@@ -879,6 +879,7 @@ mvt_clip_and_validate_geos(LWGEOM *lwgeom, uint8_t basic_type, uint32_t extent,
 	{
 		gridspec grid = {0, 0, 0, 0, 1, 1, 0, 0};
 		GBOX bgbox;
+		bgbox.flags = 0;
 		bgbox.xmax = bgbox.ymax = (double)extent + (double)buffer;
 		bgbox.xmin = bgbox.ymin = -(double)buffer;
 		FLAGS_SET_GEODETIC(bgbox.flags, 0);
@@ -1109,7 +1110,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:
 extensions/address_standardizer/pagc_std_api.h     |  4 ++--
 extensions/address_standardizer/parseaddress-api.c |  8 ++++----
 liblwgeom/lwgeom_topo.c                            |  2 +-
 loader/shp2pgsql-core.c                            |  4 ++--
 postgis/gserialized_estimate.c                     | 15 ++++-----------
 postgis/gserialized_spgist_3d.c                    | 22 +++++++++++-----------
 postgis/mvt.c                                      |  3 ++-
 7 files changed, 26 insertions(+), 32 deletions(-)


hooks/post-receive
-- 
PostGIS


More information about the postgis-tickets mailing list