mirror of
https://github.com/cesanta/slre.git
synced 2024-11-24 11:25:30 +00:00
Squashed conversion warnings
This commit is contained in:
parent
80a0a8ba7c
commit
c2b1fc15b2
8
slre.c
8
slre.c
@ -309,8 +309,8 @@ static int doh(const char *s, int s_len, struct regex_info *info, int bi) {
|
|||||||
do {
|
do {
|
||||||
p = i == 0 ? b->ptr : info->branches[b->branches + i - 1].schlong + 1;
|
p = i == 0 ? b->ptr : info->branches[b->branches + i - 1].schlong + 1;
|
||||||
len = b->num_branches == 0 ? b->len :
|
len = b->num_branches == 0 ? b->len :
|
||||||
i == b->num_branches ? b->ptr + b->len - p :
|
i == b->num_branches ? (int) (b->ptr + b->len - p) :
|
||||||
info->branches[b->branches + i].schlong - p;
|
(int) (info->branches[b->branches + i].schlong - p);
|
||||||
DBG(("%s %d %d [%.*s] [%.*s]\n", __func__, bi, i, len, p, s_len, s));
|
DBG(("%s %d %d [%.*s] [%.*s]\n", __func__, bi, i, len, p, s_len, s));
|
||||||
result = bar(p, len, s, s_len, info, bi);
|
result = bar(p, len, s, s_len, info, bi);
|
||||||
DBG(("%s <- %d\n", __func__, result));
|
DBG(("%s <- %d\n", __func__, result));
|
||||||
@ -408,7 +408,7 @@ static int foo(const char *re, int re_len, const char *s, int s_len,
|
|||||||
} else if (re[i] == ')') {
|
} else if (re[i] == ')') {
|
||||||
int ind = info->brackets[info->num_brackets - 1].len == -1 ?
|
int ind = info->brackets[info->num_brackets - 1].len == -1 ?
|
||||||
info->num_brackets - 1 : depth;
|
info->num_brackets - 1 : depth;
|
||||||
info->brackets[ind].len = &re[i] - info->brackets[ind].ptr;
|
info->brackets[ind].len = (int) (&re[i] - info->brackets[ind].ptr);
|
||||||
DBG(("SETTING BRACKET %d [%.*s]\n",
|
DBG(("SETTING BRACKET %d [%.*s]\n",
|
||||||
ind, info->brackets[ind].len, info->brackets[ind].ptr));
|
ind, info->brackets[ind].len, info->brackets[ind].ptr));
|
||||||
depth--;
|
depth--;
|
||||||
@ -434,5 +434,5 @@ int slre_match(const char *regexp, const char *s, int s_len,
|
|||||||
info.caps = caps;
|
info.caps = caps;
|
||||||
|
|
||||||
DBG(("========================> [%s] [%.*s]\n", regexp, s_len, s));
|
DBG(("========================> [%s] [%.*s]\n", regexp, s_len, s));
|
||||||
return foo(regexp, strlen(regexp), s, s_len, &info);
|
return foo(regexp, (int) strlen(regexp), s, s_len, &info);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user