[SCM] PostGIS branch stable-3.5 updated. 3.5.3-57-g686839214
git at osgeo.org
git at osgeo.org
Wed Oct 1 15:24:02 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.5 has been updated
via 686839214ba333ccd3f4eb816d9e9caeb79d93e2 (commit)
from 50caad929fce9d57ff633da75e29575b692acaa0 (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 686839214ba333ccd3f4eb816d9e9caeb79d93e2
Author: Paul Ramsey <pramsey at cleverelephant.ca>
Date: Wed Oct 1 15:23:57 2025 -0700
Remove build warnings for latest compilers.
diff --git a/liblwgeom/lwgeom_sfcgal.c b/liblwgeom/lwgeom_sfcgal.c
index fcb1c8a0e..c9aa22349 100644
--- a/liblwgeom/lwgeom_sfcgal.c
+++ b/liblwgeom/lwgeom_sfcgal.c
@@ -328,7 +328,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