1
0
mirror of https://github.com/janet-lang/janet synced 2024-11-28 19:19:53 +00:00

Silence some windows build warnings.

This commit is contained in:
Calvin Rose 2019-06-17 23:50:39 -04:00
parent 446ab037b0
commit 4bb57550c8
2 changed files with 8 additions and 8 deletions

View File

@ -254,7 +254,7 @@ uint64_t janet_getflags(const Janet *argv, int32_t n, const char *flags) {
uint64_t ret = 0;
const uint8_t *keyw = janet_getkeyword(argv, n);
int32_t klen = janet_string_length(keyw);
int32_t flen = strlen(flags);
int32_t flen = (int32_t) strlen(flags);
if (flen > 64) {
flen = 64;
}

View File

@ -966,15 +966,15 @@ static Janet parser_state_delimiters(const JanetParser *_p) {
}
static Janet parser_state_frames(const JanetParser *p) {
size_t i;
JanetArray *states = janet_array(p->statecount);
states->count = p->statecount;
int32_t count = (int32_t) p->statecount;
JanetArray *states = janet_array(count);
states->count = count;
uint8_t *buf = p->buf;
Janet *args = p->args;
for (i = p->statecount; i > 0; --i) {
JanetParseState *s = p->states + (i - 1);
states->data[i - 1] = janet_wrap_parse_state(s, args, buf, p->bufcount);
args -= s->argn;
for (int32_t i = count - 1; i >= 0; --i) {
JanetParseState *s = p->states + i;
states->data[i] = janet_wrap_parse_state(s, args, buf, p->bufcount);
args -= (ptrdiff_t) s->argn;
}
return janet_wrap_array(states);
}