Fix switch-case fallthrough compilation warning (#2753)

The commit fa5e9d72b0 ("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 commit fb4afc7ca4 ("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:
Haiyue Wang 2023-11-13 15:01:13 +08:00 committed by GitHub
parent cf0da9a8c7
commit 625c95816d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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,