Skip to content

Commit e79ae4b

Browse files
committed
Remove warnings by refactoring tfd logic
Signed-off-by: Krisztian Szilvasi <[email protected]>
1 parent 7639ed9 commit e79ae4b

File tree

1 file changed

+5
-5
lines changed
  • core/iwasm/libraries/libc-wasi/sandboxed-system-primitives/src

1 file changed

+5
-5
lines changed

core/iwasm/libraries/libc-wasi/sandboxed-system-primitives/src/posix.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2211,15 +2211,15 @@ wasmtime_ssp_poll_oneoff(wasm_exec_env_t exec_env, struct fd_table *curfds,
22112211
__WASI_RIGHT_POLL_FD_READWRITE, 0);
22122212
if (error == 0) {
22132213

2214-
// Temporary workaround (see PR#4377)
2215-
#ifdef BH_PLATFORM_ZEPHYR
2216-
os_file_handle tfd = fos[i]->file_handle->fd;
2217-
#else
2214+
// Temporary workaround (see PR#4377)
22182215
os_file_handle tfd = fos[i]->file_handle;
2219-
#endif
22202216
// Proper file descriptor on which we can poll().
22212217
pfds[i] = (os_poll_file_handle){
2218+
#ifdef BH_PLATFORM_ZEPHYR
2219+
.fd = tfd->fd,
2220+
#else
22222221
.fd = tfd,
2222+
#endif
22232223
.events = s->u.type == __WASI_EVENTTYPE_FD_READ
22242224
? POLLIN
22252225
: POLLOUT,

0 commit comments

Comments
 (0)