Just a small change in test is necessary to enable -Wall -Werror.

Signed-off-by: Andreas Pokorny <[email protected]>
---
 configure.ac  | 4 ++--
 test/litest.c | 8 ++++++--
 2 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/configure.ac b/configure.ac
index 885cb39..b7597f0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -87,8 +87,8 @@ AC_CHECK_LIB([m], [atan2])
 AC_CHECK_LIB([rt], [clock_gettime])
 
 if test "x$GCC" = "xyes"; then
-       GCC_CXXFLAGS="-Wall -Wextra -Wno-unused-parameter -g 
-fvisibility=hidden"
-       GCC_CFLAGS="$GCC_CXXFLAGS -Wmissing-prototypes -Wstrict-prototypes"
+       GCC_CXXFLAGS="-Wall -Werror -Wextra -Wno-unused-parameter -g 
-fvisibility=hidden"
+       GCC_CFLAGS="$GCC_CXXFLAGS -Wall -Werror -Wmissing-prototypes 
-Wstrict-prototypes"
 fi
 AC_SUBST(GCC_CFLAGS)
 AC_SUBST(GCC_CXXFLAGS)
diff --git a/test/litest.c b/test/litest.c
index 29e764b..6a03832 100644
--- a/test/litest.c
+++ b/test/litest.c
@@ -933,12 +933,16 @@ static inline void
 litest_copy_file(const char *dest, const char *src, const char *header)
 {
        int in, out;
+       ssize_t bytes_written, header_size;
 
        out = open(dest, O_CREAT|O_WRONLY, 0644);
        litest_assert_int_gt(out, -1);
 
-       if (header)
-               write(out, header, strlen(header));
+       if (header) {
+               header_size = strlen(header);
+               bytes_written = write(out, header, header_size);
+               litest_assert_int_eq(bytes_written, header_size);
+       }
 
        in = open(src, O_RDONLY);
        litest_assert_int_gt(in, -1);
-- 
2.1.4

_______________________________________________
wayland-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/wayland-devel

Reply via email to