]> mj.ucw.cz Git - libucw.git/commitdiff
PCRE regex: Fixed a harmless compilation warning.
authorPavel Charvat <pchar@ucw.cz>
Tue, 14 Jan 2014 12:19:58 +0000 (13:19 +0100)
committerPavel Charvat <pchar@ucw.cz>
Tue, 14 Jan 2014 12:19:58 +0000 (13:19 +0100)
ucw/regex.c

index d149d60f39be49a6c974233177129b8a5aa64cf9..82ccd4575ddb8aa63156b6315787e1a0871f2682 100644 (file)
@@ -185,7 +185,7 @@ rx_subst(regex *r, const char *by, const char *src, char *dest, uns destlen)
              uns j = *by++ - '0';
              if (j < r->real_matches && r->matches[2*j] >= 0)
                {
-                 char *s = src + r->matches[2*j];
+                 const char *s = src + r->matches[2*j];
                  uns i = r->matches[2*j+1] - r->matches[2*j];
                  if (dest + i >= end)
                    return -1;