aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Bentham <Matthew.Bentham@arm.com>2020-02-03 12:05:18 +0000
committerMatthew Bentham <matthew.bentham@arm.com>2020-02-12 15:49:42 +0000
commit0082c366fc2db46ee2cb0e171c588dfc8f26ce73 (patch)
treed20d8ed060fbc3ad8cc93a9c9cba945b7759cad5
parent80838f166ee1d6eb152dc85f21642157b80301c0 (diff)
downloadComputeLibrary-0082c366fc2db46ee2cb0e171c588dfc8f26ce73.tar.gz
Silence warnings related to "control reaches end of non-void function"
Move ERROR macros out of default branches in switch statements, to the end of the function. Signed-off-by: Matthew Bentham <Matthew.Bentham@arm.com> Change-Id: I66d47eb0f2fc0a3ab4bf2dd4a01d8b0907786c98 Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/2709 Tested-by: Arm Jenkins <bsgcomp@arm.com> Reviewed-by: Pablo Marquez <pablo.tello@arm.com> Reviewed-by: Sang-Hoon Park <sang-hoon.park@arm.com> Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
-rw-r--r--arm_compute/core/Helpers.inl4
-rw-r--r--src/core/NEON/kernels/NETransposeKernel.cpp4
-rw-r--r--src/graph/Utils.cpp4
-rw-r--r--src/runtime/SchedulerFactory.cpp4
4 files changed, 8 insertions, 8 deletions
diff --git a/arm_compute/core/Helpers.inl b/arm_compute/core/Helpers.inl
index 29f31c12c8..233d46bb86 100644
--- a/arm_compute/core/Helpers.inl
+++ b/arm_compute/core/Helpers.inl
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016-2019 ARM Limited.
+ * Copyright (c) 2016-2020 ARM Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -348,9 +348,9 @@ inline size_t get_data_layout_dimension_index(const DataLayout data_layout, cons
return 3;
break;
default:
- ARM_COMPUTE_ERROR("Data layout index not supported!");
break;
}
+ ARM_COMPUTE_ERROR("Data layout index not supported!");
}
inline DataLayoutDimension get_index_data_layout_dimension(const DataLayout data_layout, const size_t index)
diff --git a/src/core/NEON/kernels/NETransposeKernel.cpp b/src/core/NEON/kernels/NETransposeKernel.cpp
index 6a8e6ffeb5..8fc24949ed 100644
--- a/src/core/NEON/kernels/NETransposeKernel.cpp
+++ b/src/core/NEON/kernels/NETransposeKernel.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017-2019 ARM Limited.
+ * Copyright (c) 2017-2020 ARM Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -68,9 +68,9 @@ unsigned int num_elems_processed(size_t element_size)
return 4;
break;
default:
- ARM_COMPUTE_ERROR("Element size not supported");
break;
}
+ ARM_COMPUTE_ERROR("Element size not supported");
}
Status validate_arguments(const ITensorInfo *input, const ITensorInfo *output)
diff --git a/src/graph/Utils.cpp b/src/graph/Utils.cpp
index 3bf0caca7e..7af1812214 100644
--- a/src/graph/Utils.cpp
+++ b/src/graph/Utils.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2018-2019 ARM Limited.
+ * Copyright (c) 2018-2020 ARM Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -150,9 +150,9 @@ size_t get_dimension_idx(DataLayout data_layout, const DataLayoutDimension data_
return 3;
break;
default:
- ARM_COMPUTE_ERROR("Data layout index not supported!");
break;
}
+ ARM_COMPUTE_ERROR("Data layout index not supported!");
}
std::vector<NodeIdxPair> get_driving_nodes(const INode &node)
diff --git a/src/runtime/SchedulerFactory.cpp b/src/runtime/SchedulerFactory.cpp
index 8bdd510367..63a130dc2a 100644
--- a/src/runtime/SchedulerFactory.cpp
+++ b/src/runtime/SchedulerFactory.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2019 ARM Limited.
+ * Copyright (c) 2019-2020 ARM Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -74,9 +74,9 @@ std::unique_ptr<IScheduler> SchedulerFactory::create(Type type)
}
default:
{
- ARM_COMPUTE_ERROR("Invalid Scheduler type");
break;
}
}
+ ARM_COMPUTE_ERROR("Invalid Scheduler type");
}
} // namespace arm_compute