Skip to content
Commit b0df3062 authored by Amer Al Shanawany's avatar Amer Al Shanawany Committed by Shuah Khan
Browse files

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:100: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: default avatarAmer Al Shanawany <amer.shanawany@gmail.com>
Reviewed-by: default avatarMuhammad Usama Anjum <usama.anjum@collabora.com>
Signed-off-by: default avatarShuah Khan <skhan@linuxfoundation.org>
parent 051f2226
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment