[SCM] PostGIS branch master updated. 3.4.0rc1-1153-gb802f32c8

git at osgeo.org git at osgeo.org
Wed Jun 12 08:10:38 PDT 2024


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  b802f32c8a56a3d59cc16cb71429f483b1d4c878 (commit)
       via  fecf9cda4f41995f2d4b8f494d6944f92c7e5526 (commit)
      from  bb94b8dc8bfbe31bcf505d0262724236011601a7 (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 b802f32c8a56a3d59cc16cb71429f483b1d4c878
Author: Sandro Santilli <strk at kbt.io>
Date:   Fri Jun 7 09:38:43 2024 +0200

    Override GEOS typedef to add attribute when needed

diff --git a/liblwgeom/lwgeom_geos.h b/liblwgeom/lwgeom_geos.h
index a6e387eae..d97cc83d4 100644
--- a/liblwgeom/lwgeom_geos.h
+++ b/liblwgeom/lwgeom_geos.h
@@ -23,11 +23,18 @@
  *
  **********************************************************************/
 
+#if POSTGIS_GEOS_VERSION < 31300
+/* See https://github.com/libgeos/geos/pull/1097 */
+typedef void (*GEOSMessageHandler)(const char *fmt, ...) __attribute__ (( format(printf, 1, 0) ));
+#endif
+
 #include "geos_c.h"
 
 #include "liblwgeom.h"
 #include "lwunionfind.h"
 
+
+
 /*
 ** Public prototypes for GEOS utility functions.
 */

commit fecf9cda4f41995f2d4b8f494d6944f92c7e5526
Author: Sandro Santilli <strk at kbt.io>
Date:   Thu May 16 18:31:51 2024 +0200

    Add format attributes suggested by -Wsuggest-attribute=format

diff --git a/liblwgeom/lwgeom_geos.h b/liblwgeom/lwgeom_geos.h
index 90a1562fb..a6e387eae 100644
--- a/liblwgeom/lwgeom_geos.h
+++ b/liblwgeom/lwgeom_geos.h
@@ -45,7 +45,7 @@ int union_dbscan(LWGEOM **geoms, uint32_t num_geoms, UNIONFIND *uf, double eps,
 POINTARRAY* ptarray_from_GEOSCoordSeq(const GEOSCoordSequence* cs, uint8_t want3d);
 
 extern char lwgeom_geos_errmsg[];
-extern void lwgeom_geos_error(const char* fmt, ...);
+extern void lwgeom_geos_error(const char* fmt, ...) __attribute__ ((format (printf, 1, 2)));
 
 
 /*
diff --git a/liblwgeom/lwgeom_log.h b/liblwgeom/lwgeom_log.h
index ca65a17db..5caf9dba9 100644
--- a/liblwgeom/lwgeom_log.h
+++ b/liblwgeom/lwgeom_log.h
@@ -126,7 +126,7 @@
  * For debugging, use LWDEBUG() or LWDEBUGF().
  * @ingroup logging
  */
-void lwnotice(const char *fmt, ...);
+void lwnotice(const char *fmt, ...) __attribute__ ((format (printf, 1, 2)));
 
 /**
  * Write a notice out to the error handler.
@@ -136,7 +136,7 @@ void lwnotice(const char *fmt, ...);
  * For debugging, use LWDEBUG() or LWDEBUGF().
  * @ingroup logging
  */
-void lwerror(const char *fmt, ...);
+void lwerror(const char *fmt, ...) __attribute__ ((format (printf, 1, 2)));
 
 /**
  * Write a debug message out.
@@ -145,7 +145,7 @@ void lwerror(const char *fmt, ...);
  * efficiency.
  * @ingroup logging
  */
-void lwdebug(int level, const char *fmt, ...);
+void lwdebug(int level, const char *fmt, ...) __attribute__ ((format (printf, 2, 3)));
 
 
 
diff --git a/liblwgeom/lwutil.c b/liblwgeom/lwutil.c
index b14bb23f2..27326b912 100644
--- a/liblwgeom/lwutil.c
+++ b/liblwgeom/lwutil.c
@@ -46,13 +46,13 @@ lwreallocator lwrealloc_var = default_reallocator;
 lwfreeor lwfree_var = default_freeor;
 
 /* Default reporters */
-static void default_noticereporter(const char *fmt, va_list ap);
-static void default_errorreporter(const char *fmt, va_list ap);
+static void default_noticereporter(const char *fmt, va_list ap) __attribute__ ((format (printf, 1, 0)));
+static void default_errorreporter(const char *fmt, va_list ap) __attribute__ ((format (printf, 1, 0)));
 lwreporter lwnotice_var = default_noticereporter;
 lwreporter lwerror_var = default_errorreporter;
 
 /* Default logger */
-static void default_debuglogger(int level, const char *fmt, va_list ap);
+static void default_debuglogger(int level, const char *fmt, va_list ap) __attribute__ ((format (printf, 2, 0)));
 lwdebuglogger lwdebug_var = default_debuglogger;
 
 #define LW_MSG_MAXLEN 256
diff --git a/liblwgeom/stringbuffer.c b/liblwgeom/stringbuffer.c
index 0c7101997..902bd2094 100644
--- a/liblwgeom/stringbuffer.c
+++ b/liblwgeom/stringbuffer.c
@@ -193,6 +193,8 @@ stringbuffer_copy(stringbuffer_t *dst, stringbuffer_t *src)
 * check errno for reasons, documented in the printf man page.
 */
 static int
+stringbuffer_avprintf(stringbuffer_t *s, const char *fmt, va_list ap) __attribute__ ((format (printf, 2, 0)));
+static int
 stringbuffer_avprintf(stringbuffer_t *s, const char *fmt, va_list ap)
 {
 	int maxlen = (s->capacity - (s->str_end - s->str_start));
diff --git a/liblwgeom/stringbuffer.h b/liblwgeom/stringbuffer.h
index aa95ef4ca..6f8f3776e 100644
--- a/liblwgeom/stringbuffer.h
+++ b/liblwgeom/stringbuffer.h
@@ -53,7 +53,7 @@ extern void stringbuffer_destroy(stringbuffer_t *sb);
 extern void stringbuffer_clear(stringbuffer_t *sb);
 void stringbuffer_set(stringbuffer_t *sb, const char *s);
 void stringbuffer_copy(stringbuffer_t *sb, stringbuffer_t *src);
-extern int stringbuffer_aprintf(stringbuffer_t *sb, const char *fmt, ...);
+extern int stringbuffer_aprintf(stringbuffer_t *sb, const char *fmt, ...) __attribute__ ((format (printf, 2, 3)));
 extern const char *stringbuffer_getstring(stringbuffer_t *sb);
 extern char *stringbuffer_getstringcopy(stringbuffer_t *sb);
 extern lwvarlena_t *stringbuffer_getvarlenacopy(stringbuffer_t *s);
diff --git a/loader/pgsql2shp-core.c b/loader/pgsql2shp-core.c
index 0bea5081f..32a0eda3e 100644
--- a/loader/pgsql2shp-core.c
+++ b/loader/pgsql2shp-core.c
@@ -70,6 +70,9 @@ static char * goodDBFValue(char *in, char fieldType);
 /** @brief Binary to hexewkb conversion function */
 char *convert_bytes_to_hex(uint8_t *ewkb, size_t size);
 
+static char*
+core_asprintf(const char* format, ...) __attribute__ ((format (printf, 1, 2)));
+
 static char*
 core_asprintf(const char* format, ...)
 {
diff --git a/raster/loader/raster2pgsql.c b/raster/loader/raster2pgsql.c
index c2a8a8b83..f593ac64b 100644
--- a/raster/loader/raster2pgsql.c
+++ b/raster/loader/raster2pgsql.c
@@ -33,6 +33,9 @@
 #define xstr(s) str(s)
 #define str(s) #s
 
+static void
+loader_rt_error_handler(const char *fmt, va_list ap) __attribute__ ((format (printf, 1, 0)));
+
 static void
 loader_rt_error_handler(const char *fmt, va_list ap) {
 	static const char *label = "ERROR: ";
@@ -43,6 +46,9 @@ loader_rt_error_handler(const char *fmt, va_list ap) {
 	va_end(ap);
 }
 
+static void
+loader_rt_warning_handler(const char *fmt, va_list ap) __attribute__ ((format (printf, 1, 0)));
+
 static void
 loader_rt_warning_handler(const char *fmt, va_list ap) {
 	static const char *label = "WARNING: ";
@@ -53,6 +59,9 @@ loader_rt_warning_handler(const char *fmt, va_list ap) {
 	va_end(ap);
 }
 
+static void
+loader_rt_info_handler(const char *fmt, va_list ap) __attribute__ ((format (printf, 1, 0)));
+
 static void
 loader_rt_info_handler(const char *fmt, va_list ap) {
 	static const char *label = "INFO: ";
diff --git a/raster/rt_core/librtcore.h b/raster/rt_core/librtcore.h
index 8f4cd82b1..4c307b34b 100644
--- a/raster/rt_core/librtcore.h
+++ b/raster/rt_core/librtcore.h
@@ -258,9 +258,9 @@ extern void rtdealloc(void* mem);
 /**
  * Wrappers used for reporting errors and info.
  **/
-void rterror(const char *fmt, ...);
-void rtinfo(const char *fmt, ...);
-void rtwarn(const char *fmt, ...);
+void rterror(const char *fmt, ...) __attribute__ ((format (printf, 1, 2)));
+void rtinfo(const char *fmt, ...) __attribute__ ((format (printf, 1, 2)));
+void rtwarn(const char *fmt, ...) __attribute__ ((format (printf, 1, 2)));
 
 /**
  * Wrappers used for options
@@ -274,9 +274,9 @@ char* rtstrdup(const char *str);
 void * default_rt_allocator(size_t size);
 void * default_rt_reallocator(void * mem, size_t size);
 void default_rt_deallocator(void * mem);
-void default_rt_error_handler(const char * fmt, va_list ap);
-void default_rt_warning_handler(const char * fmt, va_list ap);
-void default_rt_info_handler(const char * fmt, va_list ap);
+void default_rt_error_handler(const char * fmt, va_list ap) __attribute__ ((format (printf, 1, 0)));
+void default_rt_warning_handler(const char * fmt, va_list ap) __attribute__ ((format (printf, 1, 0)));
+void default_rt_info_handler(const char * fmt, va_list ap) __attribute__ ((format (printf, 1, 0)));
 char * default_rt_options(const char* varname);
 
 /* Debugging macros */

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

Summary of changes:
 liblwgeom/lwgeom_geos.h      |  9 ++++++++-
 liblwgeom/lwgeom_log.h       |  6 +++---
 liblwgeom/lwutil.c           |  6 +++---
 liblwgeom/stringbuffer.c     |  2 ++
 liblwgeom/stringbuffer.h     |  2 +-
 loader/pgsql2shp-core.c      |  3 +++
 raster/loader/raster2pgsql.c |  9 +++++++++
 raster/rt_core/librtcore.h   | 12 ++++++------
 8 files changed, 35 insertions(+), 14 deletions(-)


hooks/post-receive
-- 
PostGIS


More information about the postgis-tickets mailing list