aboutsummaryrefslogtreecommitdiff
path: root/src/runtime
diff options
context:
space:
mode:
authorMichalis Spyrou <michalis.spyrou@arm.com>2019-07-01 14:20:56 +0100
committerMichalis Spyrou <michalis.spyrou@arm.com>2019-07-05 10:49:38 +0000
commit53860dd80fd6e91ce04756032a969d4b37e00a61 (patch)
tree62db9128382bdbc8c169a3664b43c7aa18fa2e9e /src/runtime
parent7bb56c6337997281df10fa28ad7924c921b920eb (diff)
downloadComputeLibrary-53860dd80fd6e91ce04756032a969d4b37e00a61.tar.gz
COMPMID-2432 Fix defects reported by Coverity
Change-Id: I887eea57cc0202ad42b76b0ea093724943116a7e Signed-off-by: Michalis Spyrou <michalis.spyrou@arm.com> Reviewed-on: https://review.mlplatform.org/c/1446 Comments-Addressed: Arm Jenkins <bsgcomp@arm.com> Tested-by: Arm Jenkins <bsgcomp@arm.com> Reviewed-by: Georgios Pinitas <georgios.pinitas@arm.com>
Diffstat (limited to 'src/runtime')
-rw-r--r--src/runtime/MultiImage.cpp10
-rw-r--r--src/runtime/TensorAllocator.cpp2
2 files changed, 6 insertions, 6 deletions
diff --git a/src/runtime/MultiImage.cpp b/src/runtime/MultiImage.cpp
index 6eba71bf1d..eec58d3ef4 100644
--- a/src/runtime/MultiImage.cpp
+++ b/src/runtime/MultiImage.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016-2018 ARM Limited.
+ * Copyright (c) 2016-2019 ARM Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -164,7 +164,7 @@ void MultiImage::allocate()
void MultiImage::create_subimage(MultiImage *image, const Coordinates &coords, unsigned int width, unsigned int height)
{
arm_compute::Format format = image->info()->format();
- const TensorInfo info(width, height, Format::U8);
+ TensorInfo info(width, height, Format::U8);
switch(format)
{
@@ -180,21 +180,21 @@ void MultiImage::create_subimage(MultiImage *image, const Coordinates &coords, u
case Format::YUYV422:
case Format::UYVY422:
{
- const TensorInfo info_full(width, height, format);
+ TensorInfo info_full(width, height, format);
std::get<0>(_plane).allocator()->init(*dynamic_cast<Image *>(image->plane(0))->allocator(), coords, info_full);
break;
}
case Format::NV12:
case Format::NV21:
{
- const TensorInfo info_uv88(width / 2, height / 2, Format::UV88);
+ TensorInfo info_uv88(width / 2, height / 2, Format::UV88);
std::get<0>(_plane).allocator()->init(*dynamic_cast<Image *>(image->plane(0))->allocator(), coords, info);
std::get<1>(_plane).allocator()->init(*dynamic_cast<Image *>(image->plane(1))->allocator(), coords, info_uv88);
break;
}
case Format::IYUV:
{
- const TensorInfo info_sub2(width / 2, height / 2, Format::U8);
+ TensorInfo info_sub2(width / 2, height / 2, Format::U8);
std::get<0>(_plane).allocator()->init(*dynamic_cast<Image *>(image->plane(0))->allocator(), coords, info);
std::get<1>(_plane).allocator()->init(*dynamic_cast<Image *>(image->plane(1))->allocator(), coords, info_sub2);
std::get<2>(_plane).allocator()->init(*dynamic_cast<Image *>(image->plane(2))->allocator(), coords, info_sub2);
diff --git a/src/runtime/TensorAllocator.cpp b/src/runtime/TensorAllocator.cpp
index 0612d751f0..d9616ca09d 100644
--- a/src/runtime/TensorAllocator.cpp
+++ b/src/runtime/TensorAllocator.cpp
@@ -105,7 +105,7 @@ TensorAllocator &TensorAllocator::operator=(TensorAllocator &&o) noexcept
return *this;
}
-void TensorAllocator::init(const TensorAllocator &allocator, const Coordinates &coords, TensorInfo sub_info)
+void TensorAllocator::init(const TensorAllocator &allocator, const Coordinates &coords, TensorInfo &sub_info)
{
// Get parent info
const TensorInfo parent_info = allocator.info();