[postgis-tickets] [SCM] PostGIS branch stable-2.4 updated. 2.4.9-10-ge93b24e
git at osgeo.org
git at osgeo.org
Sun Aug 15 17:51:16 PDT 2021
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-2.4 has been updated
via e93b24e4e8eff3a47cd4b1821ca144ae2c52c953 (commit)
from 4f4b20058ed01c2c30ae4b6a8ca2818e67471202 (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 e93b24e4e8eff3a47cd4b1821ca144ae2c52c953
Author: Regina Obe <lr at pcorp.us>
Date: Sun Aug 15 20:51:11 2021 -0400
Backport Raúl Marín CUnit fixes. Closes #4971 for PostGIS 2.4.10
diff --git a/NEWS b/NEWS
index 0342216..0dba387 100644
--- a/NEWS
+++ b/NEWS
@@ -10,6 +10,7 @@ YYYY/MM/DD
- #4727, Fix geocentric bounding box computation for rare case (Paul Ramsey)
- #4326, Fix CircularPolygon area calculation (Paul Ramsey)
- #4968, Update autogen.sh to handle autoconf 2.71 issues (Raúl Marín, Regina Obe)
+ - #4971, Cunit fixes for newer CUnit (Raúl Marín, Regina Obe)
PostGIS 2.4.9
diff --git a/liblwgeom/cunit/cu_in_twkb.c b/liblwgeom/cunit/cu_in_twkb.c
index 9313f13..43542b2 100644
--- a/liblwgeom/cunit/cu_in_twkb.c
+++ b/liblwgeom/cunit/cu_in_twkb.c
@@ -20,10 +20,10 @@
/*
** Global variable to hold TWKB strings
*/
-char *hex_a;
-char *hex_b;
-uint8_t precision = 0;
-uint8_t variant = 0;
+static char *hex_a;
+static char *hex_b;
+static uint8_t precision = 0;
+static uint8_t variant = 0;
/*
** The suite initialization function.
diff --git a/liblwgeom/cunit/cu_in_wkb.c b/liblwgeom/cunit/cu_in_wkb.c
index 7a69575..1ac85ee 100644
--- a/liblwgeom/cunit/cu_in_wkb.c
+++ b/liblwgeom/cunit/cu_in_wkb.c
@@ -20,8 +20,8 @@
/*
** Global variable to hold WKB strings
*/
-char *hex_a;
-char *hex_b;
+static char *hex_a;
+static char *hex_b;
/*
** The suite initialization function.
diff --git a/liblwgeom/cunit/cu_out_twkb.c b/liblwgeom/cunit/cu_out_twkb.c
index 27f51e9..3609416 100644
--- a/liblwgeom/cunit/cu_out_twkb.c
+++ b/liblwgeom/cunit/cu_out_twkb.c
@@ -21,8 +21,8 @@
/*
** Global variable to hold hex TWKB strings
*/
-char *s;
-char *w;
+static char *s;
+static char *w;
/*
** The suite initialization function.
diff --git a/liblwgeom/cunit/cu_out_wkb.c b/liblwgeom/cunit/cu_out_wkb.c
index d60db1b..7b23fe6 100644
--- a/liblwgeom/cunit/cu_out_wkb.c
+++ b/liblwgeom/cunit/cu_out_wkb.c
@@ -20,8 +20,8 @@
/*
** Global variable to hold hex WKB strings
*/
-char *s;
-size_t s_size;
+static char *s;
+static size_t s_size;
/*
** The suite initialization function.
diff --git a/liblwgeom/cunit/cu_out_wkt.c b/liblwgeom/cunit/cu_out_wkt.c
index c070efb..199ca62 100644
--- a/liblwgeom/cunit/cu_out_wkt.c
+++ b/liblwgeom/cunit/cu_out_wkt.c
@@ -20,7 +20,7 @@
/*
** Global variable to hold WKT strings
*/
-char *s = NULL;
+static char *s = NULL;
/*
** The suite initialization function.
diff --git a/liblwgeom/cunit/cu_tester.c b/liblwgeom/cunit/cu_tester.c
index 04b8b5e..633fff0 100644
--- a/liblwgeom/cunit/cu_tester.c
+++ b/liblwgeom/cunit/cu_tester.c
@@ -16,6 +16,7 @@
#include "cu_tester.h"
#include "../postgis_config.h"
+char cu_error_msg[MAX_CUNIT_ERROR_LENGTH + 1] = {0};
/* Internal funcs */
static void
cu_errorreporter(const char *fmt, va_list ap);
@@ -140,7 +141,7 @@ int main(int argc, char *argv[])
char *suite_name;
CU_pSuite suite_to_run;
char *test_name;
- CU_pTest test_to_run;
+ CU_pTest test_to_run = NULL;
CU_ErrorCode errCode = 0;
CU_pTestRegistry registry;
int num_run;
@@ -206,7 +207,7 @@ int main(int argc, char *argv[])
}
else
{
- if (test_name != NULL)
+ if (test_name != NULL && test_to_run != NULL)
{
/* Run only this test. */
printf("\nRunning test '%s' in suite '%s'.\n", test_name, suite_name);
diff --git a/liblwgeom/cunit/cu_tester.h b/liblwgeom/cunit/cu_tester.h
index 9e245df..9a4cc5a 100644
--- a/liblwgeom/cunit/cu_tester.h
+++ b/liblwgeom/cunit/cu_tester.h
@@ -10,6 +10,9 @@
*
**********************************************************************/
+#ifndef _CU_TESTER_H
+#define _CU_TESTER_H 1
+
#include "liblwgeom.h"
#define MAX_CUNIT_ERROR_LENGTH 512
@@ -17,7 +20,7 @@
#define PG_ADD_TEST(suite, testfunc) CU_add_test(suite, #testfunc, testfunc)
/* Contains the most recent error message generated by lwerror. */
-char cu_error_msg[MAX_CUNIT_ERROR_LENGTH+1];
+extern char cu_error_msg[];
/* Resets cu_error_msg back to blank. */
void cu_error_msg_reset(void);
@@ -75,3 +78,5 @@ typedef void (*PG_SuiteSetup)(void);
/* Utility functions */
void do_fn_test(LWGEOM* (*transfn)(LWGEOM*), char *input_wkt, char *expected_wkt);
+
+#endif /* _CU_TESTER_H */
-----------------------------------------------------------------------
Summary of changes:
NEWS | 1 +
liblwgeom/cunit/cu_in_twkb.c | 8 ++++----
liblwgeom/cunit/cu_in_wkb.c | 4 ++--
liblwgeom/cunit/cu_out_twkb.c | 4 ++--
liblwgeom/cunit/cu_out_wkb.c | 4 ++--
liblwgeom/cunit/cu_out_wkt.c | 2 +-
liblwgeom/cunit/cu_tester.c | 5 +++--
liblwgeom/cunit/cu_tester.h | 7 ++++++-
8 files changed, 21 insertions(+), 14 deletions(-)
hooks/post-receive
--
PostGIS
More information about the postgis-tickets
mailing list