pcb

Comment 2 for bug 1659045

Revision history for this message
Vladimir Zhbanov (vzhbanov) wrote : Re: [Bug 1659045] Re: gts source do not compile when DEBUG symbol defined

On Tue, Jan 24, 2017 at 05:36:08PM -0000, Chad Parker wrote:
> 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':
> split.c:735:18: warning: variable 'surface' set but not used [-Wunused-but-set-variable]
> 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]
> 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_surface_graph' defined but not used [-Wunused-function]
> static void write_surface_graph (GtsSurface * s, FILE * fp)
> ^~~~~~~~~~~~~~~~~~~
>

According to the KISS principle I usually just delete those unused
artifacts of previously written and removed stuff. If you think
they're useful for debugging, you could use something like the
following construct to preserve them:

#if DEBUG
  print_segment (s);
#endif

--
  Vladimir