[PATCH libinput] fix gcc warning on unused return value
Andreas Pokorny
andreas.pokorny at canonical.com
Fri Sep 4 04:35:01 PDT 2015
Signed-off-by: Andreas Pokorny <andreas.pokorny at canonical.com>
---
test/litest.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/test/litest.c b/test/litest.c
index 29e764b..38e313e 100644
--- a/test/litest.c
+++ b/test/litest.c
@@ -932,13 +932,15 @@ merge_events(const int *orig, const int *override)
static inline void
litest_copy_file(const char *dest, const char *src, const char *header)
{
- int in, out;
+ int in, out, length;
out = open(dest, O_CREAT|O_WRONLY, 0644);
litest_assert_int_gt(out, -1);
- if (header)
- write(out, header, strlen(header));
+ if (header) {
+ length = strlen(header);
+ litest_assert_int_eq(write(out, header, length), length);
+ }
in = open(src, O_RDONLY);
litest_assert_int_gt(in, -1);
--
2.5.0
More information about the wayland-devel
mailing list