[SCM] PostGIS branch stable-3.3 updated. 3.3.7-56-g5e99f2edf

git at osgeo.org git at osgeo.org
Wed Oct 1 15:25:46 PDT 2025


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  5e99f2edfaf388110d9d6873f4180266d7533607 (commit)
      from  2a326e9bc1739c60402e701a19fc9037b578b526 (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 5e99f2edfaf388110d9d6873f4180266d7533607
Author: Paul Ramsey <pramsey at cleverelephant.ca>
Date:   Wed Oct 1 15:25:42 2025 -0700

    Remove build warnings for latest compilers.

diff --git a/liblwgeom/lwgeom_sfcgal.c b/liblwgeom/lwgeom_sfcgal.c
index 325c67ecd..123a37783 100644
--- a/liblwgeom/lwgeom_sfcgal.c
+++ b/liblwgeom/lwgeom_sfcgal.c
@@ -292,7 +292,7 @@ ptarray_to_SFCGAL(const POINTARRAY *pa, int type)
 LWGEOM *
 SFCGAL2LWGEOM(const sfcgal_geometry_t *geom, int force3D, int32_t srid)
 {
-	uint32_t ngeoms, nshells, nsolids;
+	uint32_t ngeoms = 0, nshells = 0, nsolids = 0;
 	uint32_t i, j, k;
 	int want3d;
 
diff --git a/loader/dbfopen.c b/loader/dbfopen.c
index 32d11a0c2..c0418297b 100644
--- a/loader/dbfopen.c
+++ b/loader/dbfopen.c
@@ -1966,12 +1966,11 @@ DBFReorderFields( DBFHandle psDBF, int* panMap )
         return FALSE;
 
     /* a simple malloc() would be enough, but calloc() helps clang static analyzer */
-    panFieldOffsetNew = STATIC_CAST(int *, calloc(sizeof(int), psDBF->nFields));
-    panFieldSizeNew = STATIC_CAST(int *, calloc(sizeof(int),  psDBF->nFields));
-    panFieldDecimalsNew = STATIC_CAST(int *, calloc(sizeof(int), psDBF->nFields));
-    pachFieldTypeNew = STATIC_CAST(char *, calloc(sizeof(char), psDBF->nFields));
-    pszHeaderNew = STATIC_CAST(char*, malloc(sizeof(char) * XBASE_FLDHDR_SZ *
-                                  psDBF->nFields));
+    panFieldOffsetNew = STATIC_CAST(int *, calloc(psDBF->nFields, sizeof(int)));
+    panFieldSizeNew = STATIC_CAST(int *, calloc(psDBF->nFields, sizeof(int)));
+    panFieldDecimalsNew = STATIC_CAST(int *, calloc(psDBF->nFields, sizeof(int)));
+    pachFieldTypeNew = STATIC_CAST(char *, calloc(psDBF->nFields, sizeof(char)));
+    pszHeaderNew = STATIC_CAST(char*, malloc(sizeof(char) * XBASE_FLDHDR_SZ * psDBF->nFields));
 
     /* shuffle fields definitions */
     for(i=0; i < psDBF->nFields; i++)
diff --git a/loader/shpopen.c b/loader/shpopen.c
index 4d12d2692..a00dc19cf 100644
--- a/loader/shpopen.c
+++ b/loader/shpopen.c
@@ -366,7 +366,7 @@ SHPOpenLL( const char * pszLayer, const char * pszAccess, SAHooks *psHooks )
 /* -------------------------------------------------------------------- */
 /*  Initialize the info structure.                  */
 /* -------------------------------------------------------------------- */
-    psSHP = STATIC_CAST(SHPHandle, calloc(sizeof(SHPInfo),1));
+    psSHP = STATIC_CAST(SHPHandle, calloc(1,sizeof(SHPInfo)));
 
     psSHP->bUpdated = FALSE;
     memcpy( &(psSHP->sHooks), psHooks, sizeof(SAHooks) );
@@ -1248,7 +1248,7 @@ SHPCreateObject( int nSHPType, int nShapeId, int nParts,
         psObject->nParts = MAX(1,nParts);
 
         psObject->panPartStart = STATIC_CAST(int *,
-            calloc(sizeof(int), psObject->nParts));
+            calloc(psObject->nParts, sizeof(int)));
         psObject->panPartType = STATIC_CAST(int *,
             malloc(sizeof(int) * psObject->nParts));
 
@@ -1277,13 +1277,13 @@ SHPCreateObject( int nSHPType, int nShapeId, int nParts,
     {
         size_t nSize = sizeof(double) * nVertices;
         psObject->padfX = STATIC_CAST(double *, padfX ? malloc(nSize) :
-                                             calloc(sizeof(double),nVertices));
+                                             calloc(nVertices, sizeof(double)));
         psObject->padfY = STATIC_CAST(double *, padfY ? malloc(nSize) :
-                                             calloc(sizeof(double),nVertices));
+                                             calloc(nVertices, sizeof(double)));
         psObject->padfZ = STATIC_CAST(double *, padfZ && bHasZ ? malloc(nSize) :
-                                             calloc(sizeof(double),nVertices));
+                                             calloc(nVertices, sizeof(double)));
         psObject->padfM = STATIC_CAST(double *, padfM && bHasM ? malloc(nSize) :
-                                             calloc(sizeof(double),nVertices));
+                                             calloc(nVertices, sizeof(double)));
         if( padfX != SHPLIB_NULLPTR )
             memcpy(psObject->padfX, padfX, nSize);
         if( padfY != SHPLIB_NULLPTR )

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

Summary of changes:
 liblwgeom/lwgeom_sfcgal.c |  2 +-
 loader/dbfopen.c          | 11 +++++------
 loader/shpopen.c          | 12 ++++++------
 3 files changed, 12 insertions(+), 13 deletions(-)


hooks/post-receive
-- 
PostGIS


More information about the postgis-tickets mailing list