[pulseaudio-discuss] [PATCH 2/4] Various fixes for build warnings

Colin Guthrie gmane at colin.guthr.ie
Wed Mar 2 04:48:34 PST 2011


'Twas brillig, and Maarten Bosmans at 02/03/11 11:41 did gyre and gimble:

> diff --git a/src/tests/mainloop-test.c b/src/tests/mainloop-test.c
> index 3ec6d11..75b77b5 100644
> --- a/src/tests/mainloop-test.c
> +++ b/src/tests/mainloop-test.c
> @@ -48,7 +48,7 @@ static pa_defer_event *de;
>  
>  static void iocb(pa_mainloop_api*a, pa_io_event *e, int fd, pa_io_event_flags_t f, void *userdata) {
>      unsigned char c;
> -    (void) read(fd, &c, sizeof(c));
> +    assert(read(fd, &c, sizeof(c)) >= 0);
>      fprintf(stderr, "IO EVENT: %c\n", c < 32 ? '.' : c);
>      a->defer_enable(de, 1);
>  }

Shouldn't this be pa_assert_se()?

Col


-- 

Colin Guthrie
gmane(at)colin.guthr.ie
http://colin.guthr.ie/

Day Job:
  Tribalogic Limited [http://www.tribalogic.net/]
Open Source:
  Mageia Contributor [http://www.mageia.org/]
  PulseAudio Hacker [http://www.pulseaudio.org/]
  Trac Hacker [http://trac.edgewall.org/]




More information about the pulseaudio-discuss mailing list