selftests: pidfd: Fix compling warnings
authorLi Zhijian <lizhijian@fujitsu.com>
Thu, 1 Sep 2022 03:17:34 +0000 (03:17 +0000)
committerShuah Khan <skhan@linuxfoundation.org>
Sun, 30 Oct 2022 08:23:58 +0000 (02:23 -0600)
commit3d982441308ebdf713771c8a85c23d9b8b66b4d4
tree3ca6506dc27c4f9cd0c15693b46444692d097c1c
parent88e1f16ba58665e9edfce437ea487da2fa759af9
selftests: pidfd: Fix compling warnings

Fix warnings and enable Wall.

pidfd_wait.c: In function ‘wait_nonblock’:
pidfd_wait.c:150:13: warning: unused variable ‘status’ [-Wunused-variable]
  150 |  int pidfd, status = 0;
      |             ^~~~~~
...
pidfd_test.c: In function ‘child_poll_exec_test’:
pidfd_test.c:438:1: warning: no return statement in function returning non-void [-Wreturn-type]
  438 | }
      | ^

Signed-off-by: Li Zhijian <lizhijian@fujitsu.com>
v2: fix mistake assignment to pidfd
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
tools/testing/selftests/pidfd/Makefile
tools/testing/selftests/pidfd/pidfd_test.c
tools/testing/selftests/pidfd/pidfd_wait.c