Mercurial > hg > octave-lyh > gnulib-hg
changeset 13804:978278960489
test-select-stdin.c: avoid warn_unused_result warnings
* tests/test-select-stdin.c: Include "macros.h".
ASSERT that read and fflush succeed.
author | Jim Meyering <meyering@redhat.com> |
---|---|
date | Wed, 13 Oct 2010 11:22:35 +0200 |
parents | 112326beb7c3 |
children | f72343ef3cf6 |
files | ChangeLog tests/test-select-stdin.c |
diffstat | 2 files changed, 11 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2010-10-13 Jim Meyering <meyering@redhat.com> + + 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 <meyering@redhat.com> git-version-gen: do require git-VC'd files in cwd
--- a/tests/test-select-stdin.c +++ b/tests/test-select-stdin.c @@ -24,6 +24,8 @@ #include <sys/time.h> #include <unistd.h> +#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); } } }