PKGBUILDs/community/puzzles/106_fix-uninit-warning.diff
2009-10-09 21:15:33 -05:00

15 lines
426 B
Diff

Fix for part of #505359.
Initialise variable that gcc can't tell is initialised before used.
--- sgt-puzzles.orig/tree234.c
+++ sgt-puzzles/tree234.c
@@ -1160,7 +1160,7 @@
* in t.
*/
static node234 *split234_internal(tree234 *t, int index) {
- node234 *halves[2], *n, *sib, *sub;
+ node234 *halves[2] = { NULL, NULL }, *n, *sib, *sub;
node234 *lparent, *rparent;
int ki, pki, i, half, lcount, rcount;