fix gcc warning on unused return value

Signed-off-by: Andreas Pokorny <andreas.pokorny@canonical.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
Andreas Pokorny 2015-09-04 13:35:01 +02:00 committed by Peter Hutterer
parent 47aafeb4bc
commit 6dcbc99499

View file

@ -932,13 +932,15 @@ merge_events(const int *orig, const int *override)
static inline void static inline void
litest_copy_file(const char *dest, const char *src, const char *header) 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); out = open(dest, O_CREAT|O_WRONLY, 0644);
litest_assert_int_gt(out, -1); litest_assert_int_gt(out, -1);
if (header) if (header) {
write(out, header, strlen(header)); length = strlen(header);
litest_assert_int_eq(write(out, header, length), length);
}
in = open(src, O_RDONLY); in = open(src, O_RDONLY);
litest_assert_int_gt(in, -1); litest_assert_int_gt(in, -1);