aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--python/pyarmnn/src/pyarmnn/swig/standard_header.i6
-rw-r--r--src/profiling/test/ProfilingTests.cpp2
-rw-r--r--tests/ModelAccuracyTool-Armnn/ModelAccuracyTool-Armnn.cpp6
-rw-r--r--tests/MultipleNetworksCifar10/MultipleNetworksCifar10.cpp4
-rw-r--r--tests/NetworkExecutionUtils/NetworkExecutionUtils.hpp2
-rw-r--r--tests/TfLiteYoloV3Big-Armnn/TfLiteYoloV3Big-Armnn.cpp22
6 files changed, 21 insertions, 21 deletions
diff --git a/python/pyarmnn/src/pyarmnn/swig/standard_header.i b/python/pyarmnn/src/pyarmnn/swig/standard_header.i
index b26cb0d396..a469815675 100644
--- a/python/pyarmnn/src/pyarmnn/swig/standard_header.i
+++ b/python/pyarmnn/src/pyarmnn/swig/standard_header.i
@@ -23,7 +23,7 @@
%exception{
try {
$action
- } catch (armnn::Exception &e) {
+ } catch (const armnn::Exception& e) {
SWIG_exception(SWIG_RuntimeError, const_cast<char*>(e.what()));
}
};
@@ -31,7 +31,7 @@
%exception __getitem__ {
try {
$action
- } catch (armnn::InvalidArgumentException &e) {
+ } catch (const armnn::InvalidArgumentException &e) {
SWIG_exception(SWIG_ValueError, const_cast<char*>(e.what()));
} catch (const std::out_of_range &e) {
SWIG_exception(SWIG_IndexError, const_cast<char*>(e.what()));
@@ -43,7 +43,7 @@
%exception __setitem__ {
try {
$action
- } catch (armnn::InvalidArgumentException &e) {
+ } catch (const armnn::InvalidArgumentException &e) {
SWIG_exception(SWIG_ValueError, const_cast<char*>(e.what()));
} catch (const std::out_of_range &e) {
SWIG_exception(SWIG_IndexError, const_cast<char*>(e.what()));
diff --git a/src/profiling/test/ProfilingTests.cpp b/src/profiling/test/ProfilingTests.cpp
index c541c82717..e3a49e48c3 100644
--- a/src/profiling/test/ProfilingTests.cpp
+++ b/src/profiling/test/ProfilingTests.cpp
@@ -2088,7 +2088,7 @@ BOOST_AUTO_TEST_CASE(CheckSocketConnectionException2)
{
new SocketProfilingConnection();
}
- catch (armnnProfiling::SocketConnectionException& ex)
+ catch (const armnnProfiling::SocketConnectionException& ex)
{
BOOST_CHECK(ex.GetSocketFd() == 0);
BOOST_CHECK(ex.GetErrorNo() == 111);
diff --git a/tests/ModelAccuracyTool-Armnn/ModelAccuracyTool-Armnn.cpp b/tests/ModelAccuracyTool-Armnn/ModelAccuracyTool-Armnn.cpp
index 20f6180700..85d757f820 100644
--- a/tests/ModelAccuracyTool-Armnn/ModelAccuracyTool-Armnn.cpp
+++ b/tests/ModelAccuracyTool-Armnn/ModelAccuracyTool-Armnn.cpp
@@ -160,7 +160,7 @@ int main(int argc, char* argv[])
{
optimizedNet = armnn::Optimize(*network, computeDevice, runtime->GetDeviceSpec());
}
- catch (armnn::Exception& e)
+ catch (const armnn::Exception& e)
{
std::stringstream message;
message << "armnn::Exception (" << e.what() << ") caught from optimize.";
@@ -367,7 +367,7 @@ int main(int argc, char* argv[])
ARMNN_LOG(info) << "Accuracy Tool ran successfully!";
return 0;
}
- catch (armnn::Exception const & e)
+ catch (const armnn::Exception& e)
{
// Coverity fix: BOOST_LOG_TRIVIAL (typically used to report errors) may throw an
// exception of type std::length_error.
@@ -375,7 +375,7 @@ int main(int argc, char* argv[])
std::cerr << "Armnn Error: " << e.what() << std::endl;
return 1;
}
- catch (const std::exception & e)
+ catch (const std::exception& e)
{
// Coverity fix: various boost exceptions can be thrown by methods called by this test.
std::cerr << "WARNING: ModelAccuracyTool-Armnn: An error has occurred when running the "
diff --git a/tests/MultipleNetworksCifar10/MultipleNetworksCifar10.cpp b/tests/MultipleNetworksCifar10/MultipleNetworksCifar10.cpp
index 0e72f7bc1e..c80260130a 100644
--- a/tests/MultipleNetworksCifar10/MultipleNetworksCifar10.cpp
+++ b/tests/MultipleNetworksCifar10/MultipleNetworksCifar10.cpp
@@ -137,7 +137,7 @@ int main(int argc, char* argv[])
{
optimizedNet = armnn::Optimize(*network, computeDevice, runtime->GetDeviceSpec());
}
- catch (armnn::Exception& e)
+ catch (const armnn::Exception& e)
{
std::stringstream message;
message << "armnn::Exception ("<<e.what()<<") caught from optimize.";
@@ -216,7 +216,7 @@ int main(int argc, char* argv[])
ARMNN_LOG(info) << "Multiple networks inference ran successfully!";
return 0;
}
- catch (armnn::Exception const& e)
+ catch (const armnn::Exception& e)
{
// Coverity fix: BOOST_LOG_TRIVIAL (typically used to report errors) may throw an
// exception of type std::length_error.
diff --git a/tests/NetworkExecutionUtils/NetworkExecutionUtils.hpp b/tests/NetworkExecutionUtils/NetworkExecutionUtils.hpp
index ec0eaf90f8..ff28eb4f3b 100644
--- a/tests/NetworkExecutionUtils/NetworkExecutionUtils.hpp
+++ b/tests/NetworkExecutionUtils/NetworkExecutionUtils.hpp
@@ -519,7 +519,7 @@ int MainImpl(const ExecuteNetworkParams& params,
}
}
}
- catch (armnn::Exception const& e)
+ catch (const armnn::Exception& e)
{
ARMNN_LOG(fatal) << "Armnn Error: " << e.what();
return EXIT_FAILURE;
diff --git a/tests/TfLiteYoloV3Big-Armnn/TfLiteYoloV3Big-Armnn.cpp b/tests/TfLiteYoloV3Big-Armnn/TfLiteYoloV3Big-Armnn.cpp
index c96d1f28d0..1905e9002d 100644
--- a/tests/TfLiteYoloV3Big-Armnn/TfLiteYoloV3Big-Armnn.cpp
+++ b/tests/TfLiteYoloV3Big-Armnn/TfLiteYoloV3Big-Armnn.cpp
@@ -28,17 +28,17 @@ static const int LOAD_NETWORK_ERROR = -4;
static const int LOAD_IMAGE_ERROR = -5;
static const int GENERAL_ERROR = -100;
-#define CHECK_OK(v) \
- do { \
- try { \
- auto r_local = v; \
- if (r_local != 0) { return r_local;} \
- } \
- catch(armnn::Exception e) \
- { \
- ARMNN_LOG(error) << "Oops: " << e.what(); \
- return GENERAL_ERROR; \
- } \
+#define CHECK_OK(v) \
+ do { \
+ try { \
+ auto r_local = v; \
+ if (r_local != 0) { return r_local;} \
+ } \
+ catch (const armnn::Exception& e) \
+ { \
+ ARMNN_LOG(error) << "Oops: " << e.what(); \
+ return GENERAL_ERROR; \
+ } \
} while(0)