[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
lib/regexec.c patch to avoid shadowing warning
From: |
Paul Eggert |
Subject: |
lib/regexec.c patch to avoid shadowing warning |
Date: |
Fri, 19 Aug 2005 16:37:09 -0700 |
User-agent: |
Gnus/5.1007 (Gnus v5.10.7) Emacs/21.4 (gnu/linux) |
I installed this patch, taken from coreutils. I also filed a glibc bug
report.
2005-08-19 Jim Meyering <address@hidden>
* lib/regexec.c (proceed_next_node): Redo local variables to
avoid GCC shadowing warnings.
2005-08-19 Paul Eggert <address@hidden>
* config/srclist.txt: Comment out $LIBCSRC/posix/regexec.c.
Index: lib/regexec.c
===================================================================
RCS file: /cvsroot/gnulib/gnulib/lib/regexec.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -p -u -r1.1 -r1.2
--- lib/regexec.c 7 Jul 2005 08:08:39 -0000 1.1
+++ lib/regexec.c 19 Aug 2005 23:27:14 -0000 1.2
@@ -1236,8 +1236,7 @@ proceed_next_node (mctx, nregs, regs, pi
struct re_fail_stack_t *fs;
{
re_dfa_t *const dfa = mctx->dfa;
- int i, err, dest_node;
- dest_node = -1;
+ int i, err;
if (IS_EPSILON_NODE (dfa->nodes[node].type))
{
re_node_set *cur_nodes = &mctx->state_log[*pidx]->nodes;
@@ -1303,6 +1302,7 @@ proceed_next_node (mctx, nregs, regs, pi
if (naccepted == 0)
{
+ int dest_node;
err = re_node_set_insert (eps_via_nodes, node);
if (BE (err < 0, 0))
return -2;
@@ -1316,7 +1316,7 @@ proceed_next_node (mctx, nregs, regs, pi
if (naccepted != 0
|| check_node_accept (mctx, dfa->nodes + node, *pidx))
{
- dest_node = dfa->nexts[node];
+ int dest_node = dfa->nexts[node];
*pidx = (naccepted == 0) ? *pidx + 1 : *pidx + naccepted;
if (fs && (*pidx > mctx->match_last || mctx->state_log[*pidx] == NULL
|| !re_node_set_contains (&mctx->state_log[*pidx]->nodes,
Index: config/srclist.txt
===================================================================
RCS file: /cvsroot/gnulib/gnulib/config/srclist.txt,v
retrieving revision 1.69
retrieving revision 1.70
diff -p -u -r1.69 -r1.70
--- config/srclist.txt 19 Aug 2005 23:02:26 -0000 1.69
+++ config/srclist.txt 19 Aug 2005 23:32:21 -0000 1.70
@@ -109,7 +109,9 @@ $LIBCSRC/posix/regex.c lib gpl
# http://sources.redhat.com/bugzilla/show_bug.cgi?id=1054
#$LIBCSRC/posix/regex_internal.h lib gpl
#
-$LIBCSRC/posix/regexec.c lib gpl
+# http://sources.redhat.com/bugzilla/show_bug.cgi?id=1216
+#$LIBCSRC/posix/regexec.c lib gpl
+#
# c89 changes $LIBCSRC/string/strdup.c lib gpl
$LIBCSRC/sysdeps/generic/strtoll.c lib gpl
$LIBCSRC/sysdeps/generic/strtoul.c lib gpl
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- lib/regexec.c patch to avoid shadowing warning,
Paul Eggert <=