From: Jaroslav Kysela Date: Wed, 23 Aug 2017 10:41:22 +0000 (+0200) Subject: iptv: another way to fix the warning X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=6e0082f160b8d353539677b167ce4d432714dc50;p=thirdparty%2Ftvheadend.git iptv: another way to fix the warning --- diff --git a/src/input/mpegts/iptv/iptv_libav.c b/src/input/mpegts/iptv/iptv_libav.c index b8088ef3e..e9abcf335 100644 --- a/src/input/mpegts/iptv/iptv_libav.c +++ b/src/input/mpegts/iptv/iptv_libav.c @@ -59,7 +59,7 @@ iptv_libav_write_packet(void *opaque, uint8_t *buf, int buf_size) } sbuf_append(&la->sbuf, buf, buf_size); /* notify iptv layer that we have new data to read */ - (void)write(la->pipe.wr, "", 1); + if (write(la->pipe.wr, "", 1)) { }; } fin: pthread_mutex_unlock(&la->lock); @@ -221,7 +221,7 @@ iptv_libav_read ( iptv_mux_t *im ) ret = la->sbuf.sb_ptr; sbuf_append_from_sbuf(&im->mm_iptv_buffer, &la->sbuf); sbuf_reset(&la->sbuf, WRITE_BUFFER_SIZE * 2); - (void)read(la->pipe.rd, buf, sizeof(buf)); + if (read(la->pipe.rd, buf, sizeof(buf))) {}; pthread_mutex_unlock(&la->lock); return ret; }