From 78c0415acc2ea96febfc9d68c04d765e9d2dd20d Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Wed, 13 Oct 2010 11:22:35 +0200 Subject: [PATCH] test-select-stdin.c: avoid warn_unused_result warnings * tests/test-select-stdin.c: Include "macros.h". ASSERT that read and fflush succeed. --- ChangeLog | 6 ++++++ tests/test-select-stdin.c | 7 +++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 14b10e8b5..cb8fa3159 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2010-10-13 Jim Meyering + test-select-stdin.c: avoid warn_unused_result warnings + * tests/test-select-stdin.c: Include "macros.h". + ASSERT that read and fflush succeed. + +2010-10-13 Jim Meyering + git-version-gen: do require git-VC'd files in cwd * build-aux/git-version-gen: Reject a git version string if there are no commits associated with the current directory. diff --git a/tests/test-select-stdin.c b/tests/test-select-stdin.c index e9cee96f1..c88698cd3 100644 --- a/tests/test-select-stdin.c +++ b/tests/test-select-stdin.c @@ -24,6 +24,8 @@ #include #include +#include "macros.h" + int main (void) { @@ -67,14 +69,15 @@ main (void) exit (1); } /* Timeout */ - printf ("."); fflush (stdout); + printf ("."); + ASSERT (fflush (stdout) == 0); } else { char c; printf ("Input available! Trying to read 1 byte...\n"); - read (0, &c, 1); + ASSERT (read (0, &c, 1) == 1); } } } -- 2.11.0