diff options
author | Andreas Schneider <asn@cryptomilk.org> | 2023-04-21 11:15:20 +0200 |
---|---|---|
committer | Andreas Schneider <asn@cryptomilk.org> | 2023-04-21 12:14:48 +0200 |
commit | f5530bf566f6617565b5c1f5d1a9acc964199c93 (patch) | |
tree | b55012a224c11a9ba5635ece4a27b90892e51a36 | |
parent | a114a21eff58492046645b052fa3f703cddc9ce8 (diff) | |
download | rneovim-f5530bf566f6617565b5c1f5d1a9acc964199c93.tar.gz rneovim-f5530bf566f6617565b5c1f5d1a9acc964199c93.tar.bz2 rneovim-f5530bf566f6617565b5c1f5d1a9acc964199c93.zip |
fix(linematch): initialize array
gsrc/nvim/linematch.c: In function ‘try_possible_paths’:
gsrc/nvim/linematch.c:204:35: warning: ‘from_vals’ may be used uninitialized [-Wmaybe-uninitialized]
204 | size_t unwrapped_idx_from = unwrap_indexes(from_vals, diff_len, ndiffs);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-rw-r--r-- | src/nvim/linematch.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nvim/linematch.c b/src/nvim/linematch.c index a15f41d9a8..7bde6bb121 100644 --- a/src/nvim/linematch.c +++ b/src/nvim/linematch.c @@ -186,7 +186,7 @@ static void try_possible_paths(const int *df_iters, const size_t *paths, const i { if (path_idx == npaths) { if ((*choice) > 0) { - int from_vals[LN_MAX_BUFS]; + int from_vals[LN_MAX_BUFS] = { 0 }; const int *to_vals = df_iters; const char *current_lines[LN_MAX_BUFS]; for (size_t k = 0; k < ndiffs; k++) { |