Mercurial > octave
changeset 33591:d26bc20bac10
glob-match.cc: Silence compiler warning with GCC 14.
* liboctave/util/glob-match.cc (symbol_match::match): GCC 14 warns about
potentially using an uninitialized variable when 'sym_wildc_idx' is incremented.
That is never an issue because it will always be initialized when that part of
the code is reached. Silence that compiler warning anyway by initializing it
with a dummy value early on.
author | Markus Mützel <markus.muetzel@gmx.de> |
---|---|
date | Fri, 17 May 2024 15:04:11 +0200 |
parents | 976638dd9021 |
children | 8a833798c741 2104a33b7e83 |
files | liboctave/util/glob-match.cc |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/liboctave/util/glob-match.cc Wed Apr 24 15:24:33 2024 -0400 +++ b/liboctave/util/glob-match.cc Fri May 17 15:04:11 2024 +0200 @@ -97,7 +97,7 @@ octave_idx_type pat_wildc_idx = -1; octave_idx_type sym_len = sym.length (); octave_idx_type sym_idx = 0; - octave_idx_type sym_wildc_idx; + octave_idx_type sym_wildc_idx = 0; while (sym_idx < sym_len) {