diff --git a/src/Changes.txt b/src/Changes.txt index f68cf3adc021aaac3737796271db04c99fce6aeb..af1e6ff1490440a613b2993f056bb495a73a9b20 100644 --- a/src/Changes.txt +++ b/src/Changes.txt @@ -88,6 +88,7 @@ To do - Number the FIXUPS - Review diffs against qhull 2003.1 - Review qh-code.htm#cpp + - Add test of user_eg3, etc. qhull 2010.0.1 2010/01/03 @@ -125,6 +126,9 @@ Breaking Code Changes: Bug fixes to C code: - Use gcc 4.4.0 or later. gcc 4.2.1, 4.2.2, and 4.3.2 -O2 segfaults in qset.c . gcc 4.1.1 was OK See bug report http://gcc.gnu.org/ml/gcc-bugs/2007-09/msg00474.html + - Rewrite qh_setappend to avoid g++ 4.1, 4.2, and 4.3 strict_aliasing error. + Orion Poplawski (orion@cora.nwra.com) + http://www.rpmfind.net/linux/RPM/fedora/12/ppc/qhull-devel-2003.1-13.fc12.ppc64.html - Fixed qh_findfacet_all(), "REALmin" should be "-REALmax" [L.A. Taylor]. Effects library users for convex hulls and halfspace intersections. - qh_printfacet [io.c] Removed extra space for neighboring facets @@ -170,6 +174,7 @@ Fixed g++ and devstudio warnings - Fix data types to remove conversion warnings [kwilliams] - Use size_t for calls to malloc,etc [kwilliams] - Change literal strings to const char* [kwilliams] + - Added type casts to SETfirst and SETsecond [amorilia+alphax] - getid_() returns an int [kwilliams] - Add missing const annotations [kwilliams] - Fixed 64-bit warnings (marked with "WARN64") diff --git a/src/qset.c b/src/qset.c index 7c0059c44b37b7cd7019085293ce017e866dbf41..24324e4f7c2307a16286d0e3fbe211330f49f9e0 100644 --- a/src/qset.c +++ b/src/qset.c @@ -8,8 +8,8 @@ see qh-set.htm and qset.h copyright (c) 1993-2010 The Geometry Center. - $Id: //product/qhull/main/rel/src/qset.c#26 $$Change: 1137 $ - $DateTime: 2010/01/02 21:58:11 $$Author: bbarber $ + $Id: //product/qhull/main/rel/src/qset.c#27 $$Change: 1142 $ + $DateTime: 2010/01/03 20:30:12 $$Author: bbarber $ */ #include "qset.h" @@ -123,8 +123,7 @@ void qh_setaddsorted(setT **setp, void *newelem) { */ void qh_setappend(setT **setp, void *newelem) { - int *sizep; - void **endp; + int *sizep, end_idx; if (!newelem) return; @@ -132,8 +131,9 @@ void qh_setappend(setT **setp, void *newelem) { qh_setlarger(setp); sizep= SETsizeaddr_(*setp); } - *(endp= &((*setp)->e[(*sizep)++ - 1].p))= newelem; - *(++endp)= NULL; + end_idx = (*sizep)++ - 1; + (*setp)->e[end_idx].p = newelem; + (*setp)->e[end_idx + 1].p = NULL; } /* setappend */ /*-<a href="qh-set.htm#TOC"