1
0
mirror of https://github.com/janet-lang/janet synced 2024-06-25 22:53:16 +00:00

Fix MSVC compiler warnings.

This commit is contained in:
Calvin Rose 2019-02-21 11:34:04 -05:00
parent 00a47dc0cb
commit df550efb6b
3 changed files with 3 additions and 3 deletions

View File

@ -38,7 +38,7 @@ static void test_valid_str(const char *str) {
double cnum, jnum;
jnum = 0.0;
cnum = atof(str);
err = janet_scan_number((const uint8_t *) str, strlen(str), &jnum);
err = janet_scan_number((const uint8_t *) str, (int32_t) strlen(str), &jnum);
assert(!err);
assert(cnum == jnum);
}

View File

@ -629,7 +629,7 @@ void janet_buffer_format(
}
case 's': {
const uint8_t *s = janet_getstring(argv, arg);
size_t l = janet_string_length(s);
int32_t l = janet_string_length(s);
if (form[2] == '\0')
janet_buffer_push_bytes(b, s, l);
else {

View File

@ -190,7 +190,7 @@ const uint8_t *janet_symbol(const uint8_t *str, int32_t len) {
/* Get a symbol from a cstring */
const uint8_t *janet_csymbol(const char *cstr) {
return janet_symbol((const uint8_t *)cstr, strlen(cstr));
return janet_symbol((const uint8_t *)cstr, (int32_t) strlen(cstr));
}
/* Store counter for genysm to avoid quadratic behavior */