]> git.neil.brown.name Git - wiggle.git/commitdiff
Silences warnings about set-but-not-used variables.
authorNeil Brown <neilb@suse.de>
Wed, 7 Dec 2011 23:22:46 +0000 (10:22 +1100)
committerNeil Brown <neilb@suse.de>
Wed, 7 Dec 2011 23:22:46 +0000 (10:22 +1100)
Signed-off-by: NeilBrown <neilb@suse.de>
bestmatch.c
dotest [changed mode: 0644->0755]
vpatch.c

index 1d5515bdf232541a606b8ef17668f3d6b505051c..1b94bec1d9272df74335b731fa0ca5414f525611 100644 (file)
@@ -477,7 +477,6 @@ static void find_best_inorder(struct file *a, struct file *b,
 
 struct csl *pdiff(struct file a, struct file b, int chunks)
 {
-       int alo, ahi, blo, bhi;
        struct csl *csl1, *csl2;
        struct best *best = malloc(sizeof(struct best)*(chunks+1));
        int i;
@@ -486,10 +485,6 @@ struct csl *pdiff(struct file a, struct file b, int chunks)
        asmall = reduce(a);
        bsmall = reduce(b);
 
-       alo = blo = 0;
-       ahi = asmall.elcnt;
-       bhi = bsmall.elcnt;
-
        for (i = 0; i < chunks+1; i++)
                best[i].val = 0;
        find_best_inorder(&asmall, &bsmall,
diff --git a/dotest b/dotest
old mode 100644 (file)
new mode 100755 (executable)
index 21de2bb7545de04871433fb7ab274ceb1c4ab487..36ecb16428d451c7c376b2d180a4fb833a3c4f5a 100644 (file)
--- a/vpatch.c
+++ b/vpatch.c
@@ -2251,6 +2251,7 @@ static void main_window(struct plist *pl, int n, FILE *f, int reverse)
                if (refresh) {
                        refresh = 0;
                        getmaxyx(stdscr, rows, cols);
+                       cols = cols; /* Silence warning that 'cols' isn't used */
                        if (row >= rows + 3)
                                row = (rows+1)/2;
                        if (row >= rows)