]> git.neil.brown.name Git - wiggle.git/commitdiff
Initialize 'o' just in case.
authorNeilBrown <neilb@suse.de>
Fri, 29 Sep 2017 02:43:55 +0000 (12:43 +1000)
committerNeilBrown <neilb@suse.de>
Fri, 29 Sep 2017 02:43:55 +0000 (12:43 +1000)
Some compilers complain that this might be used
uninitialised.  They are wrong as it is only used when 'found' is
non-zero, and it is always set before found is set, but
as I like -Werror, I need to handle bad warnings too.

Fixes #6

Signed-off-by: NeilBrown <neilb@suse.de>
vpatch.c

index 2c574c8981fda01a5fe4d1a3d37da9ff0bf9a794..a6534a4462f17356d018924562b247ebc2d8bd7c 100644 (file)
--- a/vpatch.c
+++ b/vpatch.c
@@ -801,7 +801,7 @@ static int mcontains(struct mpos pos,
        struct elmnt e;
        int found = 0;
        struct mp mp;
-       int o;
+       int o = 0;
        int len = strlen(search);
 
        do {