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:
parent
af49b18c81
commit
57baad97b9
1 changed files with 5 additions and 1 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue