From patchwork Sun Aug 18 01:13:20 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 1842 Return-Path: Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 1908C61927 for ; Sun, 18 Aug 2019 03:13:42 +0200 (CEST) Received: from pendragon.bb.dnainternet.fi (dfj612yhrgyx302h3jwwy-3.rev.dnainternet.fi [IPv6:2001:14ba:21f5:5b00:ce28:277f:58d7:3ca4]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id A70C751C for ; Sun, 18 Aug 2019 03:13:41 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1566090821; bh=NoI7cpVUBaCdLyk4InjmEZC6yarc1sUEg+2lwoUWwp0=; h=From:To:Subject:Date:In-Reply-To:References:From; b=khIJzJydLVmCGsxnzVvZAhcUIaNv01PsF3iTmHxfwV/bHiXEo31goatiRgtTPO361 WneRuxEnnxIVr/u2QLT8k1YMIiC7NX23pI1nBIyYKA+lloaqPS04GDEJ4wgtyLcK4/ lJEEYHUXu/yzgZMSugNywRfwbRX3u4A/ZJqhU0mc= From: Laurent Pinchart To: libcamera-devel@lists.libcamera.org Date: Sun, 18 Aug 2019 04:13:20 +0300 Message-Id: <20190818011329.14499-6-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190818011329.14499-1-laurent.pinchart@ideasonboard.com> References: <20190818011329.14499-1-laurent.pinchart@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 05/14] test: event-thread: Fix compilation on Chromium OS X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Aug 2019 01:13:43 -0000 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(-) diff --git a/test/event-thread.cpp b/test/event-thread.cpp index 714bc9845820..01120733eca4 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);