bug-gnulib
[Top][All Lists]
Advanced

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

FYI, regex_internal.c: remove decl of set-but-not-used local, "q"


From: Jim Meyering
Subject: FYI, regex_internal.c: remove decl of set-but-not-used local, "q"
Date: Sat, 27 Jan 2007 10:44:24 +0100

HP-UX's cc warned about this.
"q" was set twice, but never used.

        * lib/regex_internal.c (re_string_reconstruct): Remove declaration
        of set-but-not-used local, "q".

Index: lib/regex_internal.c
===================================================================
RCS file: /sources/gnulib/gnulib/lib/regex_internal.c,v
retrieving revision 1.24
diff -u -p -r1.24 regex_internal.c
--- lib/regex_internal.c        21 Sep 2006 05:25:11 -0000      1.24
+++ lib/regex_internal.c        27 Jan 2007 09:42:31 -0000
@@ -1,5 +1,6 @@
 /* Extended regular expression matching and search library.
-   Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+   Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007 Free Software
+   Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Isamu Hasegawa <address@hidden>.

@@ -706,7 +707,7 @@ re_string_reconstruct (re_string_t *pstr

              if (pstr->is_utf8)
                {
-                 const unsigned char *raw, *p, *q, *end;
+                 const unsigned char *raw, *p, *end;

                  /* Special case UTF-8.  Multi-byte chars start with any
                     byte other than 0x80 - 0xbf.  */
@@ -735,13 +736,11 @@ re_string_reconstruct (re_string_t *pstr
                          unsigned char buf[6];
                          size_t mbclen;

-                         q = p;
                          if (BE (pstr->trans != NULL, 0))
                            {
                              int i = mlen < 6 ? mlen : 6;
                              while (--i >= 0)
                                buf[i] = pstr->trans[p[i]];
-                             q = buf;
                            }
                          /* XXX Don't use mbrtowc, we know which conversion
                             to use (UTF-8 -> UCS4).  */




reply via email to

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