[PostGIS] #5729: topology failing on building on GHA that treat warnins as errors and Cirrus FreeBSD

PostGIS trac at osgeo.org
Wed May 15 11:50:56 PDT 2024


#5729: topology failing on building on GHA that treat warnins as errors and Cirrus
FreeBSD
----------------------+---------------------------
 Reporter:  robe      |      Owner:  strk
     Type:  defect    |     Status:  new
 Priority:  blocker   |  Milestone:  PostGIS 3.5.0
Component:  topology  |    Version:  master
 Keywords:            |
----------------------+---------------------------
 Now that I have GHA properly showing failures, it's showing a bit of a
 train wreck on topology.

 The ubuntu tests that treat warnings as errors:

 https://github.com/postgis/postgis/actions/runs/9066395839/job/24909205720


 {{{
 local/include -c lwcurvepoly.c -o lwcurvepoly.o >/dev/null 2>&1
 topo/lwgeom_topo.c:5136:19: error: comparison of integer expressions of
 different signedness: 'int' and 'uint64_t' {aka 'long unsigned int'}
 [-Werror=sign-compare]
  5136 |   for ( int t=0; t<firstNodeEdges->numEdges; t++ )
       |                   ^
 topo/lwgeom_topo.c:5240:23: error: comparison of integer expressions of
 different signedness: 'int' and 'uint64_t' {aka 'long unsigned int'}
 [-Werror=sign-compare]
  5240 |       for ( int t=0; t<splitNodeEdges->numEdges; t++ )
       |                       ^
 topo/lwgeom_topo.c:5459:23: error: comparison of integer expressions of
 different signedness: 'int' and 'uint64_t' {aka 'long unsigned int'}
 [-Werror=sign-compare]
  5459 |       for ( int t=0; t<commonNodeEdges->numEdges; t++ )
       |                       ^
 libtool: compile:  gcc -I./../deps/ryu/.. -I/usr/local/include
 -I/usr/include/libxml2 -I/usr/local/include -I/usr/include/json-c -DNDEBUG
 -I. -I. -std=gnu99 -g -O2 -mtune=generic -fno-omit-frame-pointer -Werror
 -Wall -Wextra -Wformat -Werror=format-security -Wno-unused-parameter -Wno-
 implicit-fallthrough -Wno-cast-function-type -fno-math-errno -fno-signed-
 zeros -Wall -O2 -fPIC -DPIC -I/usr/local/include -c gserialized.c -o
 gserialized.o >/dev/null 2>&1
 topo/lwgeom_topo.c:5792:21: error: comparison of integer expressions of
 different signedness: 'int' and 'uint64_t' {aka 'long unsigned int'}
 [-Werror=sign-compare]
  5792 |     for ( int t=0; t<splitNodeEdges->numEdges; t++ )
       |                     ^
 topo/lwgeom_topo.c:5920:21: error: comparison of integer expressions of
 different signedness: 'int' and 'uint64_t' {aka 'long unsigned int'}
 [-Werror=sign-compare]
  5920 |     for ( int t=0; t<lastNodeEdges->numEdges; t++ )
       |                     ^
 topo/lwgeom_topo.c:6053:10: error: absolute value function 'abs' given an
 argument of type 'LWT_ELEMID' {aka 'long int'} but has parameter of type
 'int' which may cause truncation of value [-Werror=absolute-value]
  6053 |     if ( abs(edge->next_right) == replacedBy[0] ) {
       |          ^~~
 topo/lwgeom_topo.c:6070:21: error: comparison of integer expressions of
 different signedness: 'int' and 'uint64_t' {aka 'long unsigned int'}
 [-Werror=sign-compare]
  6070 |     for ( int t=0; t<firstNodeEdges->numEdges; t++ )
       |                     ^
 libtool: compile:  gcc -I./../deps/ryu/.. -I/usr/local/include
 -I/usr/include/libxml2 -I/usr/local/include -I/usr/include/json-c -DNDEBUG
 -I. -I. -std=gnu99 -g -O2 -mtune=generic -fno-omit-frame-pointer -Werror
 -Wall -Wextra -Wformat -Werror=format-security -Wno-unused-parameter -Wno-
 implicit-fallthrough -Wno-cast-function-type -fno-math-errno -fno-signed-
 zeros -Wall -O2 -fPIC -DPIC -I/usr/local/include -c lwpoly.c -o lwpoly.o
 >/dev/null 2>&1
 topo/lwgeom_topo.c:6122:21: error: comparison of integer expressions of
 different signedness: 'int' and 'uint64_t' {aka 'long unsigned int'}
 [-Werror=sign-compare]
  6122 |     for ( int t=0; t<lastNodeEdges->numEdges; t++ )
       |                     ^
 cc1: all warnings being treated as errors
 make[1]: *** [Makefile:230: topo/lwt_edgeend_star.lo] Error 1
 }}}


 On Cirrhus FreeBSD 13 (but oddly bessie (64-bit) is showing no errors
 bessie32 as mentioned in another ticket is crashing, but gets past the
 compile phase

 {{{
 topo/lwgeom_topo.c:6053:10: error: absolute value function 'abs' given an
 argument of type 'LWT_ELEMID' (aka 'long') but has parameter of type 'int'
 which may cause truncation of value [-Werror,-Wabsolute-value]
     if ( abs(edge->next_right) == replacedBy[0] ) {
          ^
 topo/lwgeom_topo.c:6053:10: note: use function 'labs' instead
     if ( abs(edge->next_right) == replacedBy[0] ) {
          ^~~
          labs
 1 error generated.
 gmake[1]: *** [Makefile:230: topo/lwgeom_topo.lo] Error 1
 gmake[1]: Leaving directory '/tmp/cirrus-ci-build/liblwgeom'
 gmake: *** [GNUmakefile:27: all] Error 1
 }}}
-- 
Ticket URL: <https://trac.osgeo.org/postgis/ticket/5729>
PostGIS <http://trac.osgeo.org/postgis/>
The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project.


More information about the postgis-tickets mailing list