Skip to content

Commit a531b0c

Browse files
roxellshuahkh
authored andcommitted
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: 17a8106 ("selftests: add tests for clone3()") Signed-off-by: Anders Roxell <[email protected]> Acked-by: Christian Brauner <[email protected]> Signed-off-by: Shuah Khan <[email protected]>
1 parent 7ace3e9 commit a531b0c

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

tools/testing/selftests/clone3/clone3.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,12 @@ static int call_clone3(uint64_t flags, size_t size, enum test_mode test_mode)
5252
size = sizeof(struct __clone_args);
5353

5454
switch (test_mode) {
55+
case CLONE3_ARGS_NO_TEST:
56+
/*
57+
* Uses default 'flags' and 'SIGCHLD'
58+
* assignment.
59+
*/
60+
break;
5561
case CLONE3_ARGS_ALL_0:
5662
args.flags = 0;
5763
args.exit_signal = 0;

0 commit comments

Comments
 (0)