From fb8e061242c905356f2a9462fd0ab5c302c11a91 Mon Sep 17 00:00:00 2001 From: Matthew Brush Date: Sun, 25 Dec 2011 14:44:32 -0800 Subject: [PATCH] Prevent warning about comparing signed and unsigned values The g_match_info_fetch_pos() function uses a signed value for the match_num parameter, even though values less than 0 are not valid, so a cast is used. --- src/search.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/search.c b/src/search.c index 9d1bdbda1..467062905 100644 --- a/src/search.c +++ b/src/search.c @@ -1868,7 +1868,7 @@ static gint find_regex(ScintillaObject *sci, guint pos, GRegex *regex) /* Warning: minfo will become invalid when 'text' does! */ if (g_regex_match_full(regex, text, -1, pos, 0, &minfo, NULL)) { - gint i; + guint i; /* copy whole match text and offsets before they become invalid */ regex_match_text = g_match_info_fetch(minfo, 0); @@ -1877,7 +1877,7 @@ static gint find_regex(ScintillaObject *sci, guint pos, GRegex *regex) { gint start = -1, end = -1; - g_match_info_fetch_pos(minfo, i, &start, &end); + g_match_info_fetch_pos(minfo, (gint)i, &start, &end); regex_matches[i].start = start; regex_matches[i].end = end; } -- 2.11.4.GIT