From 57baad97b9ec1cf79c86720204d9185d0ac265c9 Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Sun, 18 Aug 2019 02:15:22 +0300 Subject: test: event-thread: Fix compilation on Chromium OS Commit 92b4af98cd67 ("test: Add EventNotifier thread move test") causes the build to fail in the Chromium OS build environment, because the return values of the pipe() function marked with the __warn_unused_result__ attribute is ignored. Fix this. Signed-off-by: Laurent Pinchart Reviewed-by: Paul Elder Reviewed-by: Jacopo Mondi --- test/event-thread.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'test/event-thread.cpp') diff --git a/test/event-thread.cpp b/test/event-thread.cpp index 714bc984..01120733 100644 --- a/test/event-thread.cpp +++ b/test/event-thread.cpp @@ -25,7 +25,11 @@ public: EventHandler() : notified_(false) { - pipe(pipefd_); + int ret = pipe(pipefd_); + if (ret < 0) { + ret = errno; + cout << "pipe() failed: " << strerror(ret) << endl; + } notifier_ = new EventNotifier(pipefd_[0], EventNotifier::Read, this); notifier_->activated.connect(this, &EventHandler::readReady); -- cgit v1.2.1