When building with the DEBUG symbol defined, the gts sources throw a warning and an error. See below.
-------------
WARNING
-------------
gcc -DHAVE_CONFIG_H -I. -I.. -I. -DG_LOG_DOMAIN=\"Gts\" -I/opt/local/include -I/opt/local/include -I/opt/local/include/glib-2.0 -I/opt/local/lib/glib-2.0/include -I/opt/local/include -D_REENTRANT -I/opt/local/include/gtk-2.0 -I/opt/local/lib/gtk-2.0/include -I/opt/local/include/pango-1.0 -I/opt/local/include/gio-unix-2.0/ -I/opt/local/include -I/opt/local/include/cairo -I/opt/local/include/atk-1.0 -I/opt/local/include/cairo -I/opt/local/include/pixman-1 -I/opt/local/include/libpng16 -I/opt/local/include -I/opt/local/include/gdk-pixbuf-2.0 -I/opt/local/include/libpng16 -I/opt/local/include/pango-1.0 -I/opt/local/include/harfbuzz -I/opt/local/include -I/opt/local/include/pango-1.0 -I/opt/local/include/glib-2.0 -I/opt/local/lib/glib-2.0/include -I/opt/local/include -I/opt/local/include/freetype2 -I/opt/local/include -I/opt/local/include/freetype2 -D_REENTRANT -I/opt/local/include/gtkglext-1.0 -I/opt/local/lib/gtkglext-1.0/include -I/opt/local/include -I/opt/local/include/gtk-2.0 -I/opt/local/lib/gtk-2.0/include -I/opt/local/include/pango-1.0 -I/opt/local/include/gtk-2.0 -I/opt/local/lib/gtk-2.0/include -I/opt/local/include/pango-1.0 -I/opt/local/include/gio-unix-2.0/ -I/opt/local/include -I/opt/local/include/cairo -I/opt/local/include/atk-1.0 -I/opt/local/include/cairo -I/opt/local/include/pixman-1 -I/opt/local/include/libpng16 -I/opt/local/include -I/opt/local/include/gdk-pixbuf-2.0 -I/opt/local/include/libpng16 -I/opt/local/include/pango-1.0 -I/opt/local/include/harfbuzz -I/opt/local/include -I/opt/local/include/pango-1.0 -I/opt/local/include/glib-2.0 -I/opt/local/lib/glib-2.0/include -I/opt/local/include -I/opt/local/include/freetype2 -I/opt/local/include -I/opt/local/include/freetype2 -D_THREAD_SAFE -D_THREAD_SAFE -DPREFIXDIR=\"/usr/local\" -DBINDIR=\"/usr/local/bin\" -DHOST=\"x86_64-apple-darwin15.6.0\" -DPCBLIBDIR=\"/usr/local/share/pcb\" -DPCBTREEDIR=\"/usr/local/share/pcb/newlib\" -DPCBTREEPATH=\"/usr/local/share/pcb/newlib:/usr/local/share/pcb/pcblib-newlib\" -pipe -arch x86_64 -ggdb -DDEBUG -Wall -Wdeclaration-after-statement -MT split.o -MD -MP -MF .deps/split.Tpo -c -o split.o split.c
split.c: In function 'gts_split_collapse':
split.c:609:5: warning: implicit declaration of function 'gts_write_segment' [-Wimplicit-function-declaration]
gts_write_segment (GTS_SEGMENT (e), GTS_POINT (v), fptr);
^~~~~~~~~~~~~~~~~
split.c:614:7: warning: implicit declaration of function 'gts_write_triangle' [-Wimplicit-function-declaration]
gts_write_triangle (i->data, GTS_POINT (v), fptr);
^~~~~~~~~~~~~~~~~~
split.c:651:14: warning: implicit declaration of function 'id' [-Wimplicit-function-declaration]
cf->f, id (cf->f), CFACE (cf->f)->t, id (CFACE (cf->f)->t));
^~
split.c:726:18: warning: variable 'surface' set but not used [-Wunused-but-set-variable]
GtsSurface * surface = NULL;
^~~~~~~
At top level:
split.c:537:13: warning: 'print_split' defined but not used [-Wunused-function]
static void print_split (GtsSplit * vs, FILE * fptr)
-------------
ERROR
-------------
gcc -DHAVE_CONFIG_H -I. -I.. -I. -DG_LOG_DOMAIN=\"Gts\" -I/opt/local/include -I/opt/local/include -I/opt/local/include/glib-2.0 -I/opt/local/lib/glib-2.0/include -I/opt/local/include -D_REENTRANT -I/opt/local/include/gtk-2.0 -I/opt/local/lib/gtk-2.0/include -I/opt/local/include/pango-1.0 -I/opt/local/include/gio-unix-2.0/ -I/opt/local/include -I/opt/local/include/cairo -I/opt/local/include/atk-1.0 -I/opt/local/include/cairo -I/opt/local/include/pixman-1 -I/opt/local/include/libpng16 -I/opt/local/include -I/opt/local/include/gdk-pixbuf-2.0 -I/opt/local/include/libpng16 -I/opt/local/include/pango-1.0 -I/opt/local/include/harfbuzz -I/opt/local/include -I/opt/local/include/pango-1.0 -I/opt/local/include/glib-2.0 -I/opt/local/lib/glib-2.0/include -I/opt/local/include -I/opt/local/include/freetype2 -I/opt/local/include -I/opt/local/include/freetype2 -D_REENTRANT -I/opt/local/include/gtkglext-1.0 -I/opt/local/lib/gtkglext-1.0/include -I/opt/local/include -I/opt/local/include/gtk-2.0 -I/opt/local/lib/gtk-2.0/include -I/opt/local/include/pango-1.0 -I/opt/local/include/gtk-2.0 -I/opt/local/lib/gtk-2.0/include -I/opt/local/include/pango-1.0 -I/opt/local/include/gio-unix-2.0/ -I/opt/local/include -I/opt/local/include/cairo -I/opt/local/include/atk-1.0 -I/opt/local/include/cairo -I/opt/local/include/pixman-1 -I/opt/local/include/libpng16 -I/opt/local/include -I/opt/local/include/gdk-pixbuf-2.0 -I/opt/local/include/libpng16 -I/opt/local/include/pango-1.0 -I/opt/local/include/harfbuzz -I/opt/local/include -I/opt/local/include/pango-1.0 -I/opt/local/include/glib-2.0 -I/opt/local/lib/glib-2.0/include -I/opt/local/include -I/opt/local/include/freetype2 -I/opt/local/include -I/opt/local/include/freetype2 -D_THREAD_SAFE -D_THREAD_SAFE -DPREFIXDIR=\"/usr/local\" -DBINDIR=\"/usr/local/bin\" -DHOST=\"x86_64-apple-darwin15.6.0\" -DPCBLIBDIR=\"/usr/local/share/pcb\" -DPCBTREEDIR=\"/usr/local/share/pcb/newlib\" -DPCBTREEPATH=\"/usr/local/share/pcb/newlib:/usr/local/share/pcb/pcblib-newlib\" -pipe -arch x86_64 -ggdb -DDEBUG -Wall -Wdeclaration-after-statement -MT boolean.o -MD -MP -MF .deps/boolean.Tpo -c -o boolean.o boolean.c
boolean.c: In function 'write_surface_graph':
boolean.c:140:15: error: invalid storage class for function 'add_to_list'
static void add_to_list (gpointer data, GSList ** l) {
^~~~~~~~~~~
boolean.c: In function 'triangulate_loop':
boolean.c:1386:2: warning: implicit declaration of function 'gts_write_triangle' [-Wimplicit-function-declaration]
gts_write_triangle (GTS_TRIANGLE (f), NULL, fp);
^~~~~~~~~~~~~~~~~~
At top level:
boolean.c:628:13: warning: 'write_graph1' defined but not used [-Wunused-function]
static void write_graph1 (GtsSegment * start, GSList * i,
^~~~~~~~~~~~
boolean.c:561:13: warning: 'print_segment' defined but not used [-Wunused-function]
static void print_segment (GtsSegment * s)
^~~~~~~~~~~~~
boolean.c:136:13: warning: 'write_surface_graph' defined but not used [-Wunused-function]
static void write_surface_graph (GtsSurface * s, FILE * fp)
^~~~~~~~~~~~~~~~~~~
make[2]: *** [boolean.o] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
I push a partial fix for this to home/cparker/ LP1659045
There are still some compile warnings that I'm not sure what to do with. It looks like there are several functions that were written for debugging but aren't used any longer. If we leave them there then we get the warnings. But they could come in handy some day, so I don't know if we want to delete them.
split.c: In function 'gts_split_ collapse' : but-set- variable]
^~~ ~~~~
^ ~~~~~~~ ~~~
split.c:735:18: warning: variable 'surface' set but not used [-Wunused-
GtsSurface * surface = NULL;
At top level:
split.c:546:13: warning: 'print_split' defined but not used [-Wunused-function]
static void print_split (GtsSplit * vs, FILE * fptr)
boolean.c:635:13: warning: 'write_graph1' defined but not used [-Wunused-function]
^ ~~~~~~~ ~~~~
^ ~~~~~~~ ~~~~~ surface_ graph' defined but not used [-Wunused-function]
^ ~~~~~~~ ~~~~~~~ ~~~~
static void write_graph1 (GtsSegment * start, GSList * i,
boolean.c:568:13: warning: 'print_segment' defined but not used [-Wunused-function]
static void print_segment (GtsSegment * s)
boolean.c:146:13: warning: 'write_
static void write_surface_graph (GtsSurface * s, FILE * fp)