mirror of
https://github.com/bytecodealliance/wasm-micro-runtime.git
synced 2025-05-08 20:56:13 +00:00
Fix switch-case fallthrough compilation warning (#2753)
The commitfa5e9d72b0
("Abstract POSIX filesystem functions") introduces the build warning: ./core/iwasm/libraries/libc-wasi/sandboxed-system-primitives/src/posix.c: In function ‘fd_object_release’: ./core/iwasm/libraries/libc-wasi/sandboxed-system-primitives/src/posix.c:545:20: warning: this statement may fall through [-Wimplicit-fallthrough=] 545 | if (os_is_dir_stream_valid(&fo->directory.handle)) { | ^ ./core/iwasm/libraries/libc-wasi/sandboxed-system-primitives/src/posix.c:549:13: note: here 549 | default: | ^~~~~~~ Refer to the commitfb4afc7ca4
("Apply clang-format for core/iwasm compilation and libraries"), add one line "// Fallthrough." to make compiler happy. Signed-off-by: Haiyue Wang <haiyue.wang@intel.com>
This commit is contained in:
parent
cf0da9a8c7
commit
625c95816d
|
@ -546,6 +546,7 @@ fd_object_release(wasm_exec_env_t env, struct fd_object *fo)
|
|||
error = os_closedir(fo->directory.handle);
|
||||
break;
|
||||
}
|
||||
// Fallthrough.
|
||||
default:
|
||||
// The env == NULL case is for
|
||||
// fd_table_destroy, path_get, path_put,
|
||||
|
|
Loading…
Reference in New Issue
Block a user