mirror of
https://github.com/bytecodealliance/wasm-micro-runtime.git
synced 2025-02-06 06:55:07 +00:00
Get rid of compilation warnings and minor doc fix (#2839)
This commit is contained in:
parent
0455071fc1
commit
873558c40e
|
@ -5873,7 +5873,7 @@ wasm_runtime_register_sub_module(const WASMModuleCommon *parent_module,
|
|||
{
|
||||
/* register sub_module into its parent sub module list */
|
||||
WASMRegisteredModule *node = NULL;
|
||||
bh_list_status ret;
|
||||
bh_list_status ret = BH_LIST_ERROR;
|
||||
|
||||
if (wasm_runtime_search_sub_module(parent_module, sub_module_name)) {
|
||||
LOG_DEBUG("%s has been registered in its parent", sub_module_name);
|
||||
|
|
|
@ -479,7 +479,7 @@ os_preadv(os_file_handle handle, const struct __wasi_iovec_t *iov, int iovcnt,
|
|||
|
||||
// Allocate a single buffer to fit all data.
|
||||
size_t totalsize = 0;
|
||||
for (size_t i = 0; i < iovcnt; ++i)
|
||||
for (int i = 0; i < iovcnt; ++i)
|
||||
totalsize += iov[i].buf_len;
|
||||
|
||||
char *buf = BH_MALLOC(totalsize);
|
||||
|
@ -498,7 +498,7 @@ os_preadv(os_file_handle handle, const struct __wasi_iovec_t *iov, int iovcnt,
|
|||
|
||||
// Copy data back to vectors.
|
||||
size_t bufoff = 0;
|
||||
for (size_t i = 0; i < iovcnt; ++i) {
|
||||
for (int i = 0; i < iovcnt; ++i) {
|
||||
if (bufoff + iov[i].buf_len < (size_t)len) {
|
||||
memcpy(iov[i].buf, buf + bufoff, iov[i].buf_len);
|
||||
bufoff += iov[i].buf_len;
|
||||
|
@ -533,14 +533,14 @@ os_pwritev(os_file_handle handle, const struct __wasi_ciovec_t *iov, int iovcnt,
|
|||
else {
|
||||
// Allocate a single buffer to fit all data.
|
||||
size_t totalsize = 0;
|
||||
for (size_t i = 0; i < iovcnt; ++i)
|
||||
for (int i = 0; i < iovcnt; ++i)
|
||||
totalsize += iov[i].buf_len;
|
||||
char *buf = BH_MALLOC(totalsize);
|
||||
if (buf == NULL) {
|
||||
return __WASI_ENOMEM;
|
||||
}
|
||||
size_t bufoff = 0;
|
||||
for (size_t i = 0; i < iovcnt; ++i) {
|
||||
for (int i = 0; i < iovcnt; ++i) {
|
||||
memcpy(buf + bufoff, iov[i].buf, iov[i].buf_len);
|
||||
bufoff += iov[i].buf_len;
|
||||
}
|
||||
|
|
|
@ -9,12 +9,12 @@ $ mkdir build
|
|||
$ cd build
|
||||
$ cmake ..
|
||||
$ make
|
||||
$ # It will build multi-module runtime and
|
||||
$ # It will build multi_module runtime and
|
||||
$ # wasm file under the ./build .
|
||||
$ # If you have built wamrc,
|
||||
$ # aot file will also genrate.
|
||||
$ ./multi-module mC.wasm
|
||||
$ ./multi_module mC.wasm
|
||||
$ ...
|
||||
$ ./multi-module mC.aot
|
||||
$ ./multi_module mC.aot
|
||||
$ ...
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user