projects
/
re2c
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9f6a3f0
)
Restored explicit cast that was removed in 7af5d437e49878ea4e8de73a02d99ad4e5751933.
author
Ulya Trofimovich
<skvadrik@gmail.com>
Sun, 16 Aug 2015 19:14:50 +0000
(20:14 +0100)
committer
Ulya 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
patch
|
blob
|
history
diff --git
a/re2c/src/parse/scanner.cc
b/re2c/src/parse/scanner.cc
index f53e4fef82aa7f39fecab033fdd1caa31b0eed7b..2c50b30f808a3337339fdc50ccd62769fd7da1ff 100644
(file)
--- a/
re2c/src/parse/scanner.cc
+++ b/
re2c/src/parse/scanner.cc
@@
-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];