Mercurial > vim
comparison src/undo.c @ 13138:0f906f414c69 v8.0.1443
patch 8.0.1443: compiler complains about uninitialized variable
commit https://github.com/vim/vim/commit/059fd01021779ee369c1e55557275f6c349fda9e
Author: Bram Moolenaar <Bram@vim.org>
Date: Wed Jan 31 14:25:53 2018 +0100
patch 8.0.1443: compiler complains about uninitialized variable
Problem: Compiler complains about uninitialized variable. (Tony Mechelynck)
Solution: Assign a value to the variable.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Wed, 31 Jan 2018 14:30:05 +0100 |
parents | c4b5ad2b3596 |
children | ac42c4b11dbc |
comparison
equal
deleted
inserted
replaced
13137:c30e4ae94349 | 13138:0f906f414c69 |
---|---|
2362 closest_start = closest; | 2362 closest_start = closest; |
2363 closest_seq = curbuf->b_u_seq_cur; | 2363 closest_seq = curbuf->b_u_seq_cur; |
2364 | 2364 |
2365 /* When "target" is 0; Back to origin. */ | 2365 /* When "target" is 0; Back to origin. */ |
2366 if (target == 0) | 2366 if (target == 0) |
2367 goto found; | 2367 { |
2368 mark = lastmark; /* avoid that GCC complains */ | |
2369 goto target_zero; | |
2370 } | |
2368 | 2371 |
2369 /* | 2372 /* |
2370 * May do this twice: | 2373 * May do this twice: |
2371 * 1. Search for "target", update "closest" to the best match found. | 2374 * 1. Search for "target", update "closest" to the best match found. |
2372 * 2. If "target" not found search for "closest". | 2375 * 2. If "target" not found search for "closest". |
2489 dofile = FALSE; | 2492 dofile = FALSE; |
2490 if (step < 0) | 2493 if (step < 0) |
2491 above = TRUE; /* stop above the header */ | 2494 above = TRUE; /* stop above the header */ |
2492 } | 2495 } |
2493 | 2496 |
2494 found: | 2497 target_zero: |
2495 /* If we found it: Follow the path to go to where we want to be. */ | 2498 /* If we found it: Follow the path to go to where we want to be. */ |
2496 if (uhp != NULL || target == 0) | 2499 if (uhp != NULL || target == 0) |
2497 { | 2500 { |
2498 /* | 2501 /* |
2499 * First go up the tree as much as needed. | 2502 * First go up the tree as much as needed. |