fix -Wunused-but-set-variable
authortg <tg@mirbsd.org>
Thu, 28 Jul 2011 14:01:53 +0000 (14:01 +0000)
committertg <tg@mirbsd.org>
Thu, 28 Jul 2011 14:01:53 +0000 (14:01 +0000)
lib/regcomp.c
lib/regex_internal.c
lib/vasnprintf.c

index 279b20c..da24468 100644 (file)
@@ -1652,8 +1652,8 @@ calc_eclosure_iter (re_node_set *new_set, re_dfa_t *dfa, Idx node, bool root)
       && dfa->edests[node].nelem
       && !dfa->nodes[dfa->edests[node].elems[0]].duplicated)
     {
-      Idx org_node, cur_node;
-      org_node = cur_node = node;
+      Idx cur_node;
+      cur_node = node;
       err = duplicate_node_closure (dfa, node, node, node, constraint);
       if (BE (err != REG_NOERROR, 0))
        return err;
index ad618cf..ae91f69 100644 (file)
@@ -629,7 +629,7 @@ re_string_reconstruct (re_string_t *pstr, Idx idx, int eflags)
 
              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.  */
@@ -644,13 +644,11 @@ re_string_reconstruct (re_string_t *pstr, Idx idx, int eflags)
                        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).  */
index 95847d7..bec69c4 100644 (file)
@@ -596,11 +596,12 @@ VASNPRINTF (CHAR_T *resultbuf, size_t *lengthp, const CHAR_T *format, va_list ar
                  {
                    size_t maxlen;
                    int count;
-                   int retcount;
+#if USE_SNPRINTF
+                   int retcount = 0;
+#endif
 
                    maxlen = allocated - length;
                    count = -1;
-                   retcount = 0;
 
 #if USE_SNPRINTF
 # define SNPRINTF_BUF(arg) \