Skip to content

Commit bb55ead

Browse files
author
Alexandra Sidorova
authored
[Snippets] Fixed coverity issues 167168 (#30435)
### Details: - *Fixed coverity issues: "dead code" and "Uncaught exception"* ### Tickets: - *CVS-167168*
1 parent e149d02 commit bb55ead

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

src/common/snippets/include/snippets/op/subgraph.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ class Subgraph : public ov::op::util::SubGraphOp {
132132
// should have explicit Constants even if they're non-scalar (Reshape, Transpose, Broadcast)
133133
// This check returns True if Constant op which is input of this op should be inside Subgraph body
134134
static auto constant_input_should_be_inside_body(const std::shared_ptr<ov::Node>& node) -> bool;
135-
static bool check_broadcast(const std::shared_ptr<const ov::Node>& node) noexcept;
135+
static bool check_broadcast(const std::shared_ptr<const ov::Node>& node);
136136
// Return estimated unique buffer count (upper bound). It's needed for tokenization
137137
static auto get_estimated_buffer_count(const ov::NodeVector& ops) -> size_t;
138138
static auto is_domain_sensitive_op(const std::shared_ptr<ov::Node>& op) -> bool;

src/common/snippets/src/lowered/expressions/buffer_expression.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,8 @@ void BufferExpression::init_allocation_size(const std::shared_ptr<LoopManager>&
7171
const auto& parent_loop_ids = get_parent_inner_loops(parent_port.get_expr()->get_loop_ids(), get_loop_ids());
7272
const auto planar_shape = utils::get_preordered_vdims(parent_port);
7373

74-
const size_t rank = allocation_rank >= 0 ? std::min(static_cast<size_t>(allocation_rank), planar_shape.size())
75-
: planar_shape.size();
74+
OPENVINO_ASSERT(allocation_rank > 0, "Allocation size must be positive");
75+
const size_t rank = std::min(static_cast<size_t>(allocation_rank), planar_shape.size());
7676

7777
const auto& subtensor = ov::snippets::utils::get_projected_subtensor(parent_port);
7878

src/common/snippets/src/op/subgraph.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ auto Subgraph::constant_input_should_be_inside_body(const std::shared_ptr<ov::No
289289
node);
290290
}
291291

292-
bool Subgraph::check_broadcast(const std::shared_ptr<const ov::Node>& node) noexcept {
292+
bool Subgraph::check_broadcast(const std::shared_ptr<const ov::Node>& node) {
293293
const auto elementwise = ov::as_type_ptr<const ov::op::util::BinaryElementwiseArithmetic>(node);
294294
return
295295
(elementwise == nullptr) ||

0 commit comments

Comments
 (0)