wasm-micro-runtime/core/shared/platform/zephyr
Krisztian c69c7e2261
Reduce warnings relevant to Zephyr platform (#4658)
This PR is intended to remove following warnings, when build in Zephyr application:

wasm-micro-runtime/core/shared/platform/zephyr/platform_internal.h:293: warning: "CLOCK_MONOTONIC" redefined
  293 | #define CLOCK_MONOTONIC 4
wasm-micro-runtime/core/shared/platform/zephyr/zephyr_file.c: In function 'zephyr_fs_alloc_obj':
wasm-micro-runtime/core/shared/platform/zephyr/zephyr_file.c:123:25: warning: implicit declaration of function 'bh_strdup' [-Wimplicit-function-declaration]
  123 |             ptr->path = bh_strdup(path);
      |                         ^~~~~~~~~
wasm-micro-runtime/core/shared/platform/zephyr/zephyr_file.c:123:23: warning: assignment to 'char *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
  123 |             ptr->path = bh_strdup(path);
      |                       ^
wasm-micro-runtime/core/shared/platform/zephyr/zephyr_file.c: In function 'os_renameat':
wasm-micro-runtime/core/shared/platform/zephyr/zephyr_file.c:853:35: warning: initialization of 'char *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
  853 |             char *new_path_copy = bh_strdup(new_path);
      |                                   ^~~~~~~~~
[45/462] Building C object CMakeFiles/app.dir/wasm-micro-runtime/core/iwasm/libraries/libc-wasi/sandboxed-system-primitives/src/posix.c.obj
wasm-micro-runtime/core/iwasm/libraries/libc-wasi/sandboxed-system-primitives/src/posix.c: In function 'wasmtime_ssp_poll_oneoff':
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')

---------

Signed-off-by: Krisztian Szilvasi <34309983+kr-t@users.noreply.github.com>
2026-02-06 09:13:06 +08:00
..
platform_internal.h Namespace generated headers with zephyr/ (#4670) 2025-11-24 19:20:53 +08:00
shared_platform.cmake Merge dev/zephyr_file_socket into main (#4347) 2025-08-25 16:55:23 +08:00
zephyr_clock.c Merge dev/zephyr_file_socket into main (#4347) 2025-08-25 16:55:23 +08:00
zephyr_file.c Reduce warnings relevant to Zephyr platform (#4658) 2026-02-06 09:13:06 +08:00
zephyr_platform.c initialize WASI stdio handles to invalid for better error handling (#4092) 2025-05-08 08:47:07 +08:00
zephyr_socket.c Merge dev/zephyr_file_socket into main (#4347) 2025-08-25 16:55:23 +08:00
zephyr_thread.c Merge dev/zephyr_file_socket into main (#4347) 2025-08-25 16:55:23 +08:00
zephyr_time.c Only access Zephyr thread stats info when it's available (#3962) 2024-12-19 14:26:34 +08:00