# HG changeset patch # User Markus Mützel # Date 1683983751 -7200 # Node ID f3d12359f0e40e7f4e1ea70fe23592b78deae35d # Parent c409e2eeb9c7ab9340da57b02cbcf42a96bf5869 lo-regexp.cc: Avoid unused variable warning with PCRE2. * liboctave/util/lo-regexp.cc (octave::regexp::match): Avoid warning about set but unused variable when building with PCRE2. diff -r c409e2eeb9c7 -r f3d12359f0e4 liboctave/util/lo-regexp.cc --- a/liboctave/util/lo-regexp.cc Sat May 13 14:26:55 2023 +0200 +++ b/liboctave/util/lo-regexp.cc Sat May 13 15:15:51 2023 +0200 @@ -488,7 +488,9 @@ string_vector tokens (pos_match); string_vector named_tokens (m_names); +#if ! defined (HAVE_PCRE2) int pos_offset = 0; +#endif pos_match = 0; for (int i = 1; i < matches; i++) @@ -532,8 +534,10 @@ tokens(pos_match++) = std::string (*(listptr+i), len); #endif } +#if ! defined (HAVE_PCRE2) else pos_offset++; +#endif } }