]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Avoid gcc warnings on cygwin
authorEric Blake <ebb9@byu.net>
Fri, 22 Dec 2017 15:57:25 +0000 (07:57 -0800)
committerPaul Eggert <eggert@cs.ucla.edu>
Fri, 22 Dec 2017 16:01:27 +0000 (08:01 -0800)
* posix/regex_internal.c (re_string_reconstruct) [!RE_ENABLE_I18N]:
* posix/regexec.c (check_arrival_add_next_nodes) [!RE_ENABLE_I18N]:
Avoid unused variable.

ChangeLog
posix/regex_internal.c
posix/regexec.c

index 14950fe3739947bf8a2fa3fff09abf4c6ca5d3ac..b296ec0ad6802d4b786c919a3fa94adc7deb08d2 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2017-12-22  Eric Blake  <ebb9@byu.net>
+
+       Avoid gcc warnings on cygwin
+       * posix/regex_internal.c (re_string_reconstruct) [!RE_ENABLE_I18N]:
+       * posix/regexec.c (check_arrival_add_next_nodes) [!RE_ENABLE_I18N]:
+       Avoid unused variable.
+
 2017-12-22  Florian Weimer  <fweimer@redhat.com>
 
        * io/Makefile (routines): Add copy_file_range.
index a97f703bc7e5c8918b7b8bc882f9342cc8f8f5e9..705d6a4c733c4785aa6e3e001c10a3fb338e873f 100644 (file)
@@ -681,10 +681,10 @@ re_string_reconstruct (re_string_t *pstr, int idx, int eflags)
        }
       else
        {
+#ifdef RE_ENABLE_I18N
          /* No, skip all characters until IDX.  */
          int prev_valid_len = pstr->valid_len;
 
-#ifdef RE_ENABLE_I18N
          if (BE (pstr->offsets_needed, 0))
            {
              pstr->len = pstr->raw_len - idx + offset;
index 95e31d3f80707e3d896209679bcbff31fad0041c..4cf1eeafc59d274ec72f8b34e1deb7d343872331 100644 (file)
@@ -2988,7 +2988,9 @@ check_arrival_add_next_nodes (re_match_context_t *mctx, int str_idx,
   const re_dfa_t *const dfa = mctx->dfa;
   int result;
   int cur_idx;
+#ifdef RE_ENABLE_I18N
   reg_errcode_t err = REG_NOERROR;
+#endif
   re_node_set union_set;
   re_node_set_init_empty (&union_set);
   for (cur_idx = 0; cur_idx < cur_nodes->nelem; ++cur_idx)