aboutsummaryrefslogtreecommitdiff
path: root/src/core
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/core
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/core')
-rw-r--r--src/core/ITensor.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/core/ITensor.cpp b/src/core/ITensor.cpp
index 7cf04b51c4..607f5cedbf 100644
--- a/src/core/ITensor.cpp
+++ b/src/core/ITensor.cpp
@@ -81,6 +81,8 @@ void ITensor::print(std::ostream &s, IOFormatInfo io_fmt) const
const Strides strides = this->info()->strides_in_bytes();
const PaddingSize padding = this->info()->padding();
const size_t num_channels = this->info()->num_channels();
+ std::ios stream_status(nullptr);
+ stream_status.copyfmt(s);
// Set precision
if(is_data_type_float(dt) && (io_fmt.precision_type != IOFormatInfo::PrecisionType::Default))
@@ -151,6 +153,9 @@ void ITensor::print(std::ostream &s, IOFormatInfo io_fmt) const
s << io_fmt.row_delim;
}
}
+
+ // Restore output stream flags
+ s.copyfmt(stream_status);
}
#endif /* ARM_COMPUTE_ASSERTS_ENABLED */