test: event-thread: Fix compilation on Chromium OS

Commit 92b4af98cd ("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 <laurent.pinchart@ideasonboard.com>
Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>
Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
This commit is contained in:
Laurent Pinchart 2019-08-18 02:15:22 +03:00
parent af49b18c81
commit 57baad97b9

View file

@ -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);