Change wasm app offset type from int32 to uint32 (#361)

And fix some sign/unsigned conversion compilation warnings.
This commit is contained in:
Wenyong Huang
2020-08-26 18:33:29 +08:00
committed by GitHub
parent 049760b849
commit 034606b0a9
20 changed files with 191 additions and 179 deletions

View File

@ -660,7 +660,7 @@ static __wasi_errno_t fd_table_insert_fd(
if (type == __WASI_FILETYPE_DIRECTORY) {
if (!mutex_init(&fo->directory.lock)) {
fd_object_release(fo);
return -1;
return (__wasi_errno_t)-1;
}
fo->directory.handle = NULL;
}

View File

@ -37,7 +37,7 @@ void random_buf(void *buf, size_t len) {
if ((size_t)x == len)
return;
buf = (void *)((unsigned char *)buf + x);
len -= x;
len -= (size_t)x;
}
}