# HG changeset patch # User Jim Meyering # Date 1286961755 -7200 # Node ID 978278960489db2d6f714e1280b8f852a0101a0f # Parent 112326beb7c39e06e2aefa0fdc52fffb70f365bd test-select-stdin.c: avoid warn_unused_result warnings * tests/test-select-stdin.c: Include "macros.h". ASSERT that read and fflush succeed. diff --git a/ChangeLog b/ChangeLog --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +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 diff --git a/tests/test-select-stdin.c b/tests/test-select-stdin.c --- 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 @@ 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); } } }