commit 70fb5a47142d240e33700b734a57433248225624 from: Neels Hofmeyr date: Thu Oct 15 13:55:38 2020 UTC diff_myers: fix some uninitialized warnings commit - 65688edf4c58356b6a78c043dae1a4832532b84f commit + 70fb5a47142d240e33700b734a57433248225624 blob - 6e754fa0fcc088feab24c22e8d57cd3010845154 blob + a3ee66c02ed67883bf020b9f55312657a914e840 --- lib/diff_myers.c +++ lib/diff_myers.c @@ -250,6 +250,8 @@ diff_divide_myers_forward(bool *found_midpoint, * yet, get the initial x from the top left of the Myers * graph. */ x = 0; + prev_x = x; + prev_y = xk_to_y(x, k); } /* Favoring "-" lines first means favoring moving rightwards in * the Myers graph. @@ -561,6 +563,8 @@ diff_divide_myers_backward(bool *found_midpoint, * yet, get the initial x from the bottom right of the * Myers graph. */ x = left->atoms.len; + prev_x = x; + prev_y = xc_to_y(x, c, delta); } /* Favoring "-" lines first means favoring moving rightwards in * the Myers graph. @@ -876,7 +880,7 @@ diff_algo_myers_divide(const struct diff_algo_config * * midpoint, to not step into another diff algo * recursion with unchanged box. */ int delta = (int)right->atoms.len - (int)left->atoms.len; - int x; + int x = 0; int y; int i; int best_forward_i = 0;