From 6a971db6fc1c7aa6eec4f0f852c4209bfd649b82 Mon Sep 17 00:00:00 2001 From: Tobias Grimm Date: Thu, 23 Apr 2009 09:21:37 +0200 Subject: Silence compiler warning about unchecked read return value. Patch provided by Rolf Ahrenberg. Note: I can't reproduce such a compile warning and a failed read should be handled in amore usefule manner. --- siinfo.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/siinfo.c b/siinfo.c index 6519c59..8bf1a85 100644 --- a/siinfo.c +++ b/siinfo.c @@ -292,7 +292,8 @@ static void DiscardBufferedSections(int card_no, uint16_t pid, int table_id) ret = poll(&pi, 1, 0); if(ret > 0 && (pi.revents & POLLIN)) { - read(fd, buf, SECTSIZE); + // TODO: Do something more useful if read fails! + if(read(fd, buf, SECTSIZE) < 0) { } n++; } } while (ret > 0); -- cgit v1.2.3