Restored explicit cast that was removed in 7af5d437e49878ea4e8de73a02d99ad4e5751933.
authorUlya Trofimovich <skvadrik@gmail.com>
Sun, 16 Aug 2015 19:14:50 +0000 (20:14 +0100)
committerUlya Trofimovich <skvadrik@gmail.com>
Sun, 16 Aug 2015 19:14:50 +0000 (20:14 +0100)
Found with [-Wsign-compare] while building with MINGW: pointer
difference is of different size on linux and windows.

re2c/src/parse/scanner.cc

index f53e4fef82aa7f39fecab033fdd1caa31b0eed7b..2c50b30f808a3337339fdc50ccd62769fd7da1ff 100644 (file)
@@ -349,7 +349,7 @@ void Scanner::fill (uint32_t need)
                {
                        need = BSIZE;
                }
-               if (top - lim < need)
+               if (static_cast<uint32_t> (top - lim) < need)
                {
                        const size_t copy = static_cast<size_t> (lim - bot);
                        char * buf = new char[copy + need];