[PATCH] check: Check for pipe return value in check_unaligned_vmsplice
Cyrill Gorcunov
gorcunov at openvz.org
Fri Feb 22 05:49:45 EST 2013
| cr-check.c: In function ‘check_unaligned_vmsplice’:
| cr-check.c:372:2: error: ignoring return value of ‘pipe’, declared with attribute warn_unused_result [-Werror=unused-result]
Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
---
cr-check.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/cr-check.c b/cr-check.c
index 95b3255..89a8589 100644
--- a/cr-check.c
+++ b/cr-check.c
@@ -369,7 +369,11 @@ static int check_unaligned_vmsplice(void)
char buf; /* :) */
struct iovec iov;
- pipe(p);
+ ret = pipe(p);
+ if (ret < 0) {
+ pr_perror("Can't create pipe");
+ return -1;
+ }
iov.iov_base = &buf;
iov.iov_len = sizeof(buf);
ret = vmsplice(p[1], &iov, 1, SPLICE_F_GIFT | SPLICE_F_NONBLOCK);
--
1.8.1.2
--HcAYCG3uE/tztfnV--
More information about the CRIU
mailing list