From patchwork Wed Jan 8 23:15:18 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Niklas_S=C3=B6derlund?= X-Patchwork-Id: 2543 Return-Path: Received: from bin-mail-out-06.binero.net (bin-mail-out-06.binero.net [195.74.38.229]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 845C36045D for ; Thu, 9 Jan 2020 00:15:25 +0100 (CET) X-Halon-ID: bdc228b9-326c-11ea-a00b-005056917a89 Authorized-sender: niklas@soderlund.pp.se Received: from bismarck.berto.se (p54ac5d7b.dip0.t-ipconnect.de [84.172.93.123]) by bin-vsp-out-01.atm.binero.net (Halon) with ESMTPA id bdc228b9-326c-11ea-a00b-005056917a89; Thu, 09 Jan 2020 00:15:24 +0100 (CET) From: =?utf-8?q?Niklas_S=C3=B6derlund?= To: libcamera-devel@lists.libcamera.org Date: Thu, 9 Jan 2020 00:15:18 +0100 Message-Id: <20200108231518.1852151-1-niklas.soderlund@ragnatech.se> X-Mailer: git-send-email 2.24.1 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH] v4l2: camera_proxy: Fix compilation error use of undeclared identifier 'ret' X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Jan 2020 23:15:25 -0000 Refactoring of the camera_proxy have left the 'ret' variable undeclared, declare it. ../../src/v4l2/v4l2_camera_proxy.cpp:273:2: error: use of undeclared identifier 'ret' ret = vcam_->invokeMethod(&V4L2Camera::configure, ^ ../../src/v4l2/v4l2_camera_proxy.cpp:278:6: error: use of undeclared identifier 'ret' if (ret < 0) Fixes: fce110c6d961c3bb ("v4l2: camera_proxy: Break out try_fmt") Signed-off-by: Niklas Söderlund Acked-by: Jacopo Mondi Reviewed-by: Laurent Pinchart --- src/v4l2/v4l2_camera_proxy.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/v4l2/v4l2_camera_proxy.cpp b/src/v4l2/v4l2_camera_proxy.cpp index 89dd7166ca527bad..00d0d57172022138 100644 --- a/src/v4l2/v4l2_camera_proxy.cpp +++ b/src/v4l2/v4l2_camera_proxy.cpp @@ -270,11 +270,11 @@ int V4L2CameraProxy::vidioc_s_fmt(struct v4l2_format *arg) tryFormat(arg); Size size(arg->fmt.pix.width, arg->fmt.pix.height); - ret = vcam_->invokeMethod(&V4L2Camera::configure, - ConnectionTypeBlocking, - &streamConfig_, size, - v4l2ToDrm(arg->fmt.pix.pixelformat), - bufferCount_); + int ret = vcam_->invokeMethod(&V4L2Camera::configure, + ConnectionTypeBlocking, + &streamConfig_, size, + v4l2ToDrm(arg->fmt.pix.pixelformat), + bufferCount_); if (ret < 0) return -EINVAL;