From 4686a097aa18fef34400470f333807e9c3e38cb9 Mon Sep 17 00:00:00 2001 From: Ulya Trofimovich Date: Tue, 11 Aug 2015 17:44:29 +0100 Subject: [PATCH] Loop counter should be unsigned (found with [-Wsign-compare]). --- re2c/src/ir/regexp/encoding/utf8/utf8_regexp.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/re2c/src/ir/regexp/encoding/utf8/utf8_regexp.cc b/re2c/src/ir/regexp/encoding/utf8/utf8_regexp.cc index 8b746366..afc64ee7 100644 --- a/re2c/src/ir/regexp/encoding/utf8/utf8_regexp.cc +++ b/re2c/src/ir/regexp/encoding/utf8/utf8_regexp.cc @@ -9,9 +9,9 @@ namespace re2c { RegExp * UTF8Symbol(utf8::rune r) { uint32_t chars[utf8::MAX_RUNE_LENGTH]; - const int chars_count = utf8::rune_to_bytes(chars, r); + const uint32_t chars_count = utf8::rune_to_bytes(chars, r); RegExp * re = new MatchOp(Range::sym (chars[0])); - for (int i = 1; i < chars_count; ++i) + for (uint32_t i = 1; i < chars_count; ++i) re = new CatOp(re, new MatchOp(Range::sym (chars[i]))); return re; } -- 2.40.0