Reduce warnings relevant to Zephyr platform#4658
Reduce warnings relevant to Zephyr platform#4658lum1n0us merged 4 commits intobytecodealliance:mainfrom
Conversation
e79ae4b to
7639ed9
Compare
|
Update after the initial commit: Apparently, the CI doesn't like that in Zephyr's case I used int instead of os_file_handle. I have tried another way of refactoring the logic of how we abstract the wasm-micro-runtime/core/iwasm/libraries/libc-wasi/sandboxed-system-primitives/src/posix.c:2216:42: warning: initialization of 'os_file_handle' {aka 'struct zephyr_handle *'} from 'int' makes pointer from integer without a cast [-Wint-conversion]
2216 | os_file_handle tfd = fos[i]->file_handle->fd;
| ^~~
wasm-micro-runtime/core/iwasm/libraries/libc-wasi/sandboxed-system-primitives/src/posix.c:2222:31: warning: initialization of 'int' from 'os_file_handle' {aka 'struct zephyr_handle *'} makes integer from pointer without a cast [-Wint-conversion]
2222 | .fd = tfd,
| ^~~
wasm-micro-runtime/core/iwasm/libraries/libc-wasi/sandboxed-system-primitives/src/posix.c:2222:31: note: (near initialization for '(anonymous).fd')Fixing temporary workaround which was made in PR#4377 will probably help with these remaining warnings as well. |
7639ed9 to
bdfd724
Compare
|
IMM, a better approach is to avoid using bh_xxx() functions in zephyr/zephyr_file.c. Instead, opt for a specific version that is compatible with Zephyr |
|
Noted, will check out the alternatives. |
|
Removed bh_strdup() function, therefore reducing the undeclared warning. |
Signed-off-by: Krisztian Szilvasi <34309983+kr-t@users.noreply.github.com>
Signed-off-by: Krisztian Szilvasi <34309983+kr-t@users.noreply.github.com>
Signed-off-by: Krisztian Szilvasi <34309983+kr-t@users.noreply.github.com>
Signed-off-by: Krisztian Szilvasi <34309983+kr-t@users.noreply.github.com>
986174b to
50d92d3
Compare
This PR is intended to remove following warnings, when build in Zephyr application:
Result - no warnings.Tested in ocre as a zephyr application.
Updates:
there have been updates and changes after the initial commit and initial description. Please check those below in my follow-up comments.