diff options
author | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2016-04-25 17:16:06 +0300 |
---|---|---|
committer | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2016-04-25 17:16:19 +0300 |
commit | d6d102751083a189d1d450ced62e6c527e2b640c (patch) | |
tree | 9b47d0cf050f45d1fa4ad11029d388be194102dd | |
parent | 0839fe5b1e40baee1e219c939cffcbd72065e9fb (diff) |
kmscapture: Clang doesn't like variable len arrays, use vector
-rw-r--r-- | tests/kmscapture.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/kmscapture.cpp b/tests/kmscapture.cpp index 81650d7..3f1243b 100644 --- a/tests/kmscapture.cpp +++ b/tests/kmscapture.cpp @@ -361,7 +361,8 @@ int main(int argc, char** argv) FAIL_IF(i < nr_cameras, "available plane not found"); - struct pollfd fds[nr_cameras + 1] = { }; + vector<pollfd> fds(nr_cameras + 1); + for (i = 0; i < nr_cameras; i++) { fds[i].fd = cameras[i]->fd(); fds[i].events = POLLIN; @@ -370,7 +371,7 @@ int main(int argc, char** argv) fds[nr_cameras].events = POLLIN; while (true) { - int r = poll(fds, nr_cameras + 1, -1); + int r = poll(fds.data(), nr_cameras + 1, -1); ASSERT(r > 0); if (fds[nr_cameras].revents != 0) |