From 4bd8d15f96173e1025ff03bfc5f05a94bf024270 Mon Sep 17 00:00:00 2001 From: Kieran Bingham Date: Tue, 13 Oct 2020 15:58:26 +0100 Subject: libcamera: pipeline: Use existing variable definitions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Prevent variable shadowing by removing the redeclaration of variables with the same name (and type) where the existing variable can be reused. Signed-off-by: Kieran Bingham Reviewed-by: Niklas Söderlund Reviewed-by: Laurent Pinchart --- src/libcamera/pipeline/raspberrypi/raspberrypi.cpp | 2 +- src/libcamera/pipeline/simple/simple.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src/libcamera') diff --git a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp index 7f8deb38..dd62dfc7 100644 --- a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp +++ b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp @@ -1008,7 +1008,7 @@ int PipelineHandlerRPi::queueAllBuffers(Camera *camera) */ unsigned int i; for (i = 0; i < data->dropFrameCount_; i++) { - int ret = stream->queueBuffer(nullptr); + ret = stream->queueBuffer(nullptr); if (ret) return ret; } diff --git a/src/libcamera/pipeline/simple/simple.cpp b/src/libcamera/pipeline/simple/simple.cpp index 47737730..d63f9701 100644 --- a/src/libcamera/pipeline/simple/simple.cpp +++ b/src/libcamera/pipeline/simple/simple.cpp @@ -612,8 +612,8 @@ int SimplePipelineHandler::configure(Camera *camera, CameraConfiguration *c) useConverter_ = config->needConversion(); if (useConverter_) { - int ret = converter_->configure(pipeConfig.pixelFormat, - pipeConfig.captureSize, &cfg); + ret = converter_->configure(pipeConfig.pixelFormat, + pipeConfig.captureSize, &cfg); if (ret < 0) { LOG(SimplePipeline, Error) << "Unable to configure converter"; -- cgit v1.2.1