]> git.tuebingen.mpg.de Git - paraslash.git/commitdiff
[btr]: Avoid a gcc warning.
authorAndre Noll <maan@systemlinux.org>
Sun, 17 Jan 2010 20:30:27 +0000 (21:30 +0100)
committerAndre Noll <maan@systemlinux.org>
Sun, 17 Jan 2010 20:30:27 +0000 (21:30 +0100)
Although the warning
warning: 'brs[1]' may be used uninitialized in this function
is clearly bogus, it can't hurt to assert that i == 2 which also makes the warning to away.

buffer_tree.c

index 0ffe62465183a52e9508f60215b59dde09fba553..aff03444cc8cc3d0181812fc677c03bfa132e3b0 100644 (file)
@@ -849,6 +849,7 @@ static int merge_input(struct btr_node *btrn)
                if (i == 2)
                        break;
        }
+       assert(i == 2);
        /* make a new btrb that combines the two buffers and a br to it. */
        sz = szs[0] + szs[1];
        buf = para_malloc(sz);