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);
      |                                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This commit is contained in:
Andreas Schneider 2023-04-21 11:15:20 +02:00
parent a114a21eff
commit f5530bf566

View File

@ -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++) {