diff options
author | Andrew G. Morgan <morgan@kernel.org> | 2021-08-25 18:48:01 -0700 |
---|---|---|
committer | Andrew G. Morgan <morgan@kernel.org> | 2021-08-25 18:48:01 -0700 |
commit | 6715a509015d2143dad0df92f2b12d3317b2cdcf (patch) | |
tree | b6738c748c86c419b9dd7939993f6f97b793d82e | |
parent | be65c32dedbea96760fa7226881fed64f63d9a52 (diff) | |
download | libcap-6715a509015d2143dad0df92f2b12d3317b2cdcf.tar.gz |
Address a compiler warning with the tests/uns_test.
We're comfortable ignoring a write return code, but not all compilers
are so display a comment when the write in the uns_test fails.
This addresses:
https://bugzilla.kernel.org/show_bug.cgi?id=214143
Signed-off-by: Andrew G. Morgan <morgan@kernel.org>
-rw-r--r-- | tests/uns_test.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/uns_test.c b/tests/uns_test.c index d8f5415..a1dbde0 100644 --- a/tests/uns_test.c +++ b/tests/uns_test.c @@ -153,6 +153,8 @@ int main(int argc, char **argv) bailok: fprintf(stderr, "exploit attempt failed\n"); - (void) write(fds.to[1], "!", 1); + if (write(fds.to[1], "!", 1) != 1) { + perror("failed to inform child [ignored]"); + } exit(0); } |