diff options
author | Kieran Bingham <kieran.bingham@ideasonboard.com> | 2020-10-13 15:58:26 +0100 |
---|---|---|
committer | Kieran Bingham <kieran.bingham@ideasonboard.com> | 2020-10-21 16:15:40 +0100 |
commit | 4bd8d15f96173e1025ff03bfc5f05a94bf024270 (patch) | |
tree | efae4b9c484e9da170804c661fdf65c707f5f71e /src | |
parent | d3f60c84583fb2cf01a87bed620f95f37d8f0df5 (diff) |
libcamera: pipeline: Use existing variable definitions
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 <kieran.bingham@ideasonboard.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/libcamera/pipeline/raspberrypi/raspberrypi.cpp | 2 | ||||
-rw-r--r-- | src/libcamera/pipeline/simple/simple.cpp | 4 |
2 files changed, 3 insertions, 3 deletions
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"; |