1
0
mirror of https://github.com/janet-lang/janet synced 2024-06-26 07:03:16 +00:00

Try to silence some appveyor warnings.

This commit is contained in:
Calvin Rose 2018-08-05 21:32:32 -04:00
parent d73079652b
commit f3480c1c1d
4 changed files with 4 additions and 4 deletions

View File

@ -334,7 +334,7 @@ static void dst_quick_asm(
def->flags = flags;
def->slotcount = slots;
def->bytecode = malloc(bytecode_size);
def->bytecode_length = bytecode_size / sizeof(uint32_t);
def->bytecode_length = (int32_t)(bytecode_size / sizeof(uint32_t));
def->name = dst_cstring(name);
if (!def->bytecode) {
DST_OUT_OF_MEMORY;

View File

@ -384,7 +384,7 @@ static Dst doframe(DstStackFrame *frame) {
dst_table_put(t, dst_csymbolv(":tail"), dst_wrap_true());
}
if (frame->func && frame->pc) {
off = frame->pc - def->bytecode;
off = (int32_t) (frame->pc - def->bytecode);
dst_table_put(t, dst_csymbolv(":pc"), dst_wrap_integer(off));
if (def->sourcemap) {
DstSourceMapping mapping = def->sourcemap[off];

View File

@ -305,7 +305,7 @@ void *dst_gcalloc(enum DstMemoryType type, size_t size) {
mdata->flags = type;
/* Prepend block to heap list */
dst_vm_next_collection += size;
dst_vm_next_collection += (int32_t) size;
mdata->next = dst_vm_blocks;
dst_vm_blocks = mdata;

View File

@ -207,7 +207,7 @@ static const char *read_chunk(IOFile *iof, DstBuffer *buffer, int32_t nBytesMax)
size_t nread = fread((char *)(buffer->data + buffer->count), 1, ntoread, iof->file);
if (nread != ntoread && ferror(iof->file))
return "could not read file";
buffer->count += nread;
buffer->count += (int32_t) nread;
return NULL;
}