提交 a531b0c2 编写于 作者: A Anders Roxell 提交者: Shuah Khan

selftests: clone3: clone3: add case CLONE3_ARGS_NO_TEST

Building selftests/clone3 with clang warns about enumeration not handled
in switch case:

clone3.c:54:10: warning: enumeration value 'CLONE3_ARGS_NO_TEST' not handled in switch [-Wswitch]
        switch (test_mode) {
                ^

Add the missing switch case with a comment.

Fixes: 17a81069 ("selftests: add tests for clone3()")
Signed-off-by: NAnders Roxell <anders.roxell@linaro.org>
Acked-by: NChristian Brauner <christian.brauner@ubuntu.com>
Signed-off-by: NShuah Khan <skhan@linuxfoundation.org>
上级 7ace3e9a
...@@ -52,6 +52,12 @@ static int call_clone3(uint64_t flags, size_t size, enum test_mode test_mode) ...@@ -52,6 +52,12 @@ static int call_clone3(uint64_t flags, size_t size, enum test_mode test_mode)
size = sizeof(struct __clone_args); size = sizeof(struct __clone_args);
switch (test_mode) { switch (test_mode) {
case CLONE3_ARGS_NO_TEST:
/*
* Uses default 'flags' and 'SIGCHLD'
* assignment.
*/
break;
case CLONE3_ARGS_ALL_0: case CLONE3_ARGS_ALL_0:
args.flags = 0; args.flags = 0;
args.exit_signal = 0; args.exit_signal = 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册