From 0ecdfde0be4a6636dad06cccc3ffe9ea4509cbc6 Mon Sep 17 00:00:00 2001 From: Arseniy Obolenskiy Date: Fri, 3 Jan 2025 16:20:21 +0100 Subject: [PATCH] Fix coverity scan issues in CPU plugin Node class: 1563144, 1563146 --- src/plugins/intel_cpu/src/node.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/plugins/intel_cpu/src/node.cpp b/src/plugins/intel_cpu/src/node.cpp index ddf8d068f920a2..7bb14ca53635dd 100644 --- a/src/plugins/intel_cpu/src/node.cpp +++ b/src/plugins/intel_cpu/src/node.cpp @@ -337,7 +337,7 @@ void Node::selectPreferPrimitiveDescriptor(const std::vector& pr bool Node::isOneDimShape(const ov::PartialShape& pshape) { int value_1_num = 0; int sz = static_cast(pshape.size()); - for (auto s : pshape) { + for (const auto& s : pshape) { if (s.is_static() && s.get_length() == 1) { value_1_num++; } @@ -383,7 +383,7 @@ void Node::selectPreferPrimitiveDescriptorWithShape(const std::vectorisCompatible(*parentDesc); if (!isCompatible) { - if (!isReorderRequired(parentDesc, curDesc)) { + if (!isReorderRequired(std::move(parentDesc), curDesc)) { estimate += 1; } else { estimate += ov::shape_size(curDesc->getShape().getMinDims());