]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
libstdc++: Tweaks to <regex> to avoid warnings
authorJonathan Wakely <jwakely@redhat.com>
Mon, 27 Sep 2021 19:44:24 +0000 (20:44 +0100)
committerJonathan Wakely <jwakely@redhat.com>
Fri, 23 Jun 2023 12:36:50 +0000 (13:36 +0100)
Signed-off-by: Jonathan Wakely <jwakely@redhat.com>
libstdc++-v3/ChangeLog:

* include/bits/regex_compiler.tcc: Add line break in empty while
statement.
* include/bits/regex_executor.tcc: Avoid unused parameter
warning.

(cherry picked from commit b5f276b8c76d892f7fed229153cfbadc13f4696e)

libstdc++-v3/include/bits/regex_compiler.tcc
libstdc++-v3/include/bits/regex_executor.tcc

index d29a0537283720e1e1cf9dda5d4a21e8ffb091e1..3667c860690de9c226da4607210e84947627f1ca 100644 (file)
@@ -140,7 +140,8 @@ namespace __detail
        return true;
       if (this->_M_atom())
        {
-         while (this->_M_quantifier());
+         while (this->_M_quantifier())
+           ;
          return true;
        }
       return false;
@@ -440,7 +441,8 @@ namespace __detail
              __last_char.second = '-';
            }
        }
-      while (_M_expression_term(__last_char, __matcher));
+      while (_M_expression_term(__last_char, __matcher))
+       ;
       if (__last_char.first)
        __matcher._M_add_char(__last_char.second);
       __matcher._M_ready();
index 5c8f8492de15ffabef79edfdff6738d4ca041258..352f24bf306b6ec91437570be3851891650f2c23 100644 (file)
@@ -423,7 +423,7 @@ namespace __detail
   template<typename _BiIter, typename _Alloc, typename _TraitsT,
           bool __dfs_mode>
     void _Executor<_BiIter, _Alloc, _TraitsT, __dfs_mode>::
-    _M_handle_accept(_Match_mode __match_mode, _StateIdT __i)
+    _M_handle_accept(_Match_mode __match_mode, _StateIdT)
     {
       if (__dfs_mode)
        {