Commit b8ebb4d2 authored by Cyrill Gorcunov's avatar Cyrill Gorcunov Committed by Pavel Emelyanov

check: Check for pipe return value in check_unaligned_vmsplice

| 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: 's avatarCyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent 94ef0394
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment