diff options
author | Axel Rasmussen <axelrasmussen@google.com> | 2022-01-28 01:11:15 +0300 |
---|---|---|
committer | Shuah Khan <skhan@linuxfoundation.org> | 2022-02-04 23:07:07 +0300 |
commit | e2aa5e650b07693477dff554053605976789fd68 (patch) | |
tree | ca1ece1e133a29cdd96047b2d5a5263462ca5b32 /tools/testing/selftests/clone3/clone3.c | |
parent | 4cbd93c3c110447adc66cb67c08af21f939ae2d7 (diff) | |
download | linux-e2aa5e650b07693477dff554053605976789fd68.tar.xz |
selftests: fixup build warnings in pidfd / clone3 tests
These are some trivial fixups, which were needed to build the tests with
clang and -Werror. The following issues are fixed:
- Remove various unused variables.
- In child_poll_leader_exit_test, clang isn't smart enough to realize
syscall(SYS_exit, 0) won't return, so it complains we never return
from a non-void function. Add an extra exit(0) to appease it.
- In test_pidfd_poll_leader_exit, ret may be branched on despite being
uninitialized, if we have !use_waitpid. Initialize it to zero to get
the right behavior in that case.
Signed-off-by: Axel Rasmussen <axelrasmussen@google.com>
Acked-by: Christian Brauner <brauner@kernel.org>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
Diffstat (limited to 'tools/testing/selftests/clone3/clone3.c')
-rw-r--r-- | tools/testing/selftests/clone3/clone3.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/tools/testing/selftests/clone3/clone3.c b/tools/testing/selftests/clone3/clone3.c index 076cf4325f78..cd4582129c7d 100644 --- a/tools/testing/selftests/clone3/clone3.c +++ b/tools/testing/selftests/clone3/clone3.c @@ -126,8 +126,6 @@ static void test_clone3(uint64_t flags, size_t size, int expected, int main(int argc, char *argv[]) { - pid_t pid; - uid_t uid = getuid(); ksft_print_header(); |