~mdw
/
sgt
/
puzzles
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix warnings generated by gcc 4.6.0 about variables set but not
[sgt/puzzles]
/
grid.c
diff --git
a/grid.c
b/grid.c
index
d73e521
..
d7e6442
100644
(file)
--- a/
grid.c
+++ b/
grid.c
@@
-454,6
+454,14
@@
static void grid_trim_vigorously(grid *g)
dots[i] = (dots[i] ? newdots++ : -1);
/*
dots[i] = (dots[i] ? newdots++ : -1);
/*
+ * Free the dynamically allocated 'dots' pointer lists in faces
+ * we're going to discard.
+ */
+ for (i = 0; i < g->num_faces; i++)
+ if (faces[i] < 0)
+ sfree(g->faces[i].dots);
+
+ /*
* Go through and compact the arrays.
*/
for (i = 0; i < g->num_dots; i++)
* Go through and compact the arrays.
*/
for (i = 0; i < g->num_dots; i++)