aboutsummaryrefslogtreecommitdiffstats
path: root/lib/libdvbv5/dvb-dev-local.c
diff options
context:
space:
mode:
authorHans Verkuil <hans.verkuil@cisco.com>2018-07-30 07:53:52 (GMT)
committerHans Verkuil <hans.verkuil@cisco.com>2018-07-30 07:53:52 (GMT)
commit954ce5cb99f3c472813dcdd86e10b15c46d2ccfc (patch)
tree7b6d6b144eb9b93dd9a9d281128b1c83ef6086c6 /lib/libdvbv5/dvb-dev-local.c
parentd37f4cfe57c98180aac8db7bdc4c0de8881a7953 (diff)
libdvbv5/v4l2-compliance: fix select() gcc-8.1 warnings
The same fds argument is passed twice to the select() call. This leads (with gcc 8.1) to this warning (same warning for v4l2-compliance): dvb-dev-local.c:614:7: warning: passing argument 2 to restrict-qualified parameter aliases with argument 4 [-Wrestrict] &set, NULL, &set, NULL)); ^~~~ ~~~~ Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Diffstat (limited to 'lib/libdvbv5/dvb-dev-local.c')
-rw-r--r--lib/libdvbv5/dvb-dev-local.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/lib/libdvbv5/dvb-dev-local.c b/lib/libdvbv5/dvb-dev-local.c
index 7ebf2b6..e98b967 100644
--- a/lib/libdvbv5/dvb-dev-local.c
+++ b/lib/libdvbv5/dvb-dev-local.c
@@ -607,11 +607,15 @@ static ssize_t dvb_local_read(struct dvb_open_descriptor *open_dev,
* check if read is ready, in order to emulate blocking mode
*/
if (!strcmp(dev->bus_addr, "platform:dvbloopback")) {
- fd_set set;
- FD_ZERO(&set);
- FD_SET(fd, &set);
+ fd_set rset;
+ fd_set eset;
+
+ FD_ZERO(&rset);
+ FD_SET(fd, &rset);
+ FD_ZERO(&eset);
+ FD_SET(fd, &eset);
ret = TEMP_FAILURE_RETRY(select(FD_SETSIZE,
- &set, NULL, &set, NULL));
+ &rset, NULL, &eset, NULL));
if (ret == -1) {
if (errno != EOVERFLOW)
dvb_perror("read()");

Privacy Policy