linux/tools/testing/selftests/capabilities
Amer Al Shanawany b0df306284 selftests/capabilities: fix warn_unused_result build warnings
Fix the following warnings by adding return check and error handling.

test_execve.c: In function ‘do_tests’:
test_execve.c💯17: warning: ignoring return value of
 ‘capng_get_caps_process’
 declared with attribute ‘warn_unused_result’ [-Wunused-result]
  100 |                 capng_get_caps_process();
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~
validate_cap.c: In function ‘main’:
validate_cap.c:47:9: warning: ignoring return value of
 ‘capng_get_caps_process’
declared with attribute ‘warn_unused_result’ [-Wunused-result]
   47 |         capng_get_caps_process();
      |         ^~~~~~~~~~~~~~~~~~~~~~~~

Signed-off-by: Amer Al Shanawany <amer.shanawany@gmail.com>
Reviewed-by: Muhammad Usama Anjum <usama.anjum@collabora.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
2024-05-08 16:48:25 -06:00
..
.gitignore .gitignore: add SPDX License Identifier 2020-03-25 11:50:48 +01:00
Makefile selftests: capabilities: remove duplicate unneeded defines 2023-10-06 17:33:37 -06:00
test_execve.c selftests/capabilities: fix warn_unused_result build warnings 2024-05-08 16:48:25 -06:00
validate_cap.c selftests/capabilities: fix warn_unused_result build warnings 2024-05-08 16:48:25 -06:00