From b8ebb4d2602dcb6d2aa4c1ff3701fe506f390c84 Mon Sep 17 00:00:00 2001 From: Cyrill Gorcunov Date: Fri, 22 Feb 2013 14:49:45 +0400 Subject: [PATCH] check: Check for pipe return value in check_unaligned_vmsplice MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit | 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 Signed-off-by: Pavel Emelyanov --- cr-check.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/cr-check.c b/cr-check.c index 95b32551a..89a85894c 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);