[postgis-tickets] [SCM] PostGIS branch stable-3.3 updated. 3.3.2-13-g0134ee720

git at osgeo.org git at osgeo.org
Mon Jan 30 09:28:53 PST 2023


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  0134ee7202de4389c1f02645cf265878d6d9d6a3 (commit)
      from  4b2485658b04aaa75162ab2e3b1d286bc6d716f2 (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 0134ee7202de4389c1f02645cf265878d6d9d6a3
Author: Sandro Santilli <strk at kbt.io>
Date:   Fri Sep 16 23:33:25 2022 +0200

    Fix partly outside array bounds gcc warning
    
    Backports fix #5233 in 3.3.3dev

diff --git a/libpgcommon/gserialized_gist.h b/libpgcommon/gserialized_gist.h
index b3e0ca75a..8edade557 100644
--- a/libpgcommon/gserialized_gist.h
+++ b/libpgcommon/gserialized_gist.h
@@ -56,16 +56,12 @@ bool gidx_is_unknown(const GIDX *a);
 /* Generate human readable form for GIDX. */
 char *gidx_to_string(GIDX *a);
 
-/* typedef to correct array-bounds checking for casts to GIDX - do not
-   use this ANYWHERE except in the casts below */
-typedef float _gidx_float_array[sizeof(float) * 2 * 4];
-
 /* Returns number of dimensions for this GIDX */
 #define GIDX_NDIMS(gidx) ((VARSIZE((gidx)) - VARHDRSZ) / (2 * sizeof(float)))
 /* Minimum accessor. */
-#define GIDX_GET_MIN(gidx, dimension) (*((_gidx_float_array *)(&(gidx)->c)))[2 * (dimension)]
+#define GIDX_GET_MIN(gidx, dimension) *( (gidx)->c + 2 * (dimension) )
 /* Maximum accessor. */
-#define GIDX_GET_MAX(gidx, dimension) (*((_gidx_float_array *)(&(gidx)->c)))[2 * (dimension) + 1]
+#define GIDX_GET_MAX(gidx, dimension) *( (gidx)->c + 2 * (dimension) + 1 )
 /* Minimum setter. */
 #define GIDX_SET_MIN(gidx, dimension, value) ((gidx)->c[2 * (dimension)] = (value))
 /* Maximum setter. */

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

Summary of changes:
 libpgcommon/gserialized_gist.h | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)


hooks/post-receive
-- 
PostGIS


More information about the postgis-tickets mailing list