[postgis-tickets] [SCM] PostGIS branch master updated. 3.1.0alpha2-35-gfcc88fa

git at osgeo.org git at osgeo.org
Sat Aug 1 09:13:33 PDT 2020


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  fcc88fa9ce76cc2b93cfd752d770bbb4960b73ba (commit)
      from  7b7e66ae6e8438e125ceda7e413eb141e462b571 (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 fcc88fa9ce76cc2b93cfd752d770bbb4960b73ba
Author: Raúl Marín <git at rmr.ninja>
Date:   Sat Aug 1 18:11:13 2020 +0200

    Revert "Cunit: Avoid crashing when comparing NULL strings"
    
    This reverts commit 7b7e66ae6e8438e125ceda7e413eb141e462b571.
    
    Although it is useful, this raised quite a bit of warnings as
    some of the uses of the macro pass static strings and those
    can't be NULL.

diff --git a/liblwgeom/cunit/cu_tester.h b/liblwgeom/cunit/cu_tester.h
index 3cd0c13..baa5e62 100644
--- a/liblwgeom/cunit/cu_tester.h
+++ b/liblwgeom/cunit/cu_tester.h
@@ -40,21 +40,11 @@ typedef void (*PG_SuiteSetup)(void);
   CU_ASSERT_EQUAL(o,e); \
 } while (0);
 
-#define ASSERT_STRING_EQUAL(o, e) \
-	do \
-	{ \
-		if ((!(o) && (e)) || (!(e) && (o)) || strcmp((o), (e)) != 0) \
-		{ \
-			fprintf(stderr, \
-				"[%s:%d]\n Expected: %s\n Obtained: %s\n", \
-				__FILE__, \
-				__LINE__, \
-				(e) ? (e) : "NULL", \
-				(o) ? (o) : "NULL"); \
-			CU_FAIL(); \
-		} \
-		CU_PASS(); \
-	} while (0);
+#define ASSERT_STRING_EQUAL(o,e) do { \
+  if ( strcmp(o,e) != 0 ) \
+    fprintf(stderr, "[%s:%d]\n Expected: %s\n Obtained: %s\n", __FILE__, __LINE__, (e), (o)); \
+  CU_ASSERT_STRING_EQUAL(o,e); \
+} while (0);
 
 #define ASSERT_VARLENA_EQUAL(v, s) \
 	do \

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

Summary of changes:
 liblwgeom/cunit/cu_tester.h | 20 +++++---------------
 1 file changed, 5 insertions(+), 15 deletions(-)


hooks/post-receive
-- 
PostGIS


More information about the postgis-tickets mailing list