bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

regexec.c patch imported from coreutils to avoid uninit var warning


From: Paul Eggert
Subject: regexec.c patch imported from coreutils to avoid uninit var warning
Date: Sat, 20 Aug 2005 17:44:17 -0700
User-agent: Gnus/5.1007 (Gnus v5.10.7) Emacs/21.4 (gnu/linux)

I installed this and filed glibc bug 1225:

2005-08-20  Paul Eggert  <address@hidden>

        * config/srclist.txt: Add glibc bug 1225.

2005-08-20  Jim Meyering  <address@hidden>

        * lib/regexec.c (regexec, re_search_stub) [!_LIBC]: Omit declaration
        of unused local, dfa.

--- config/srclist.txt  21 Aug 2005 00:29:47 -0000      1.75
+++ config/srclist.txt  21 Aug 2005 00:41:42 -0000
@@ -119,6 +119,7 @@ $LIBCSRC/posix/regex.c                      lib gpl
 #
 # http://sources.redhat.com/bugzilla/show_bug.cgi?id=1216
 # http://sources.redhat.com/bugzilla/show_bug.cgi?id=1220
+# http://sources.redhat.com/bugzilla/show_bug.cgi?id=1225
 #$LIBCSRC/posix/regexec.c              lib gpl
 #
 # c89 changes $LIBCSRC/string/strdup.c         lib gpl
--- lib/regexec.c       20 Aug 2005 07:42:15 -0000      1.3
+++ lib/regexec.c       21 Aug 2005 00:41:43 -0000
@@ -214,7 +214,9 @@ regexec (const regex_t *__restrict preg,
 {
   reg_errcode_t err;
   int start, length;
+#ifdef _LIBC
   re_dfa_t *dfa = (re_dfa_t *)preg->buffer;
+#endif
 
   if (eflags & ~(REG_NOTBOL | REG_NOTEOL | REG_STARTEND))
     return REG_BADPAT;
@@ -393,7 +395,9 @@ re_search_stub (struct re_pattern_buffer
   regmatch_t *pmatch;
   int nregs, rval;
   int eflags = 0;
+#ifdef _LIBC
   re_dfa_t *dfa = (re_dfa_t *)bufp->buffer;
+#endif
 
   /* Check for out-of-range.  */
   if (BE (start < 0 || start > length, 0))




reply via email to

[Prev in Thread] Current Thread [Next in Thread]