[GPU][Coverity] Fix coverity defects (#86191) (#11852)

- CID 1486993 Big parameter passed by value (PASS_BY_VALUE)
- CID 1489431 Uninitialized scalar variable
- CID 1489432 Uninitialized scalar variable
This commit is contained in:
Paul Youngsoo Ahn authored and GitHub committed 2022-06-13 02:51:45 +00:00
1 parent 9bda2bd580
commit ca7ddae9ba
4 files changed
+4 -4

No files matched your search

@@ -147,7 +147,7 @@ void combine_bf_with_first_spatial_dim(cldnn::layout& l) {
l.size.spatial[last_spatial_dim_idx] = 1;
}
int64_t get_f_offset(cldnn::layout l, dnnl::memory::desc desc) {
int64_t get_f_offset(cldnn::layout l, dnnl::memory::desc&& desc) {
int64_t offset = 0;
auto f_padding = l.data_padding.lower_size().feature[0];
if (f_padding != 0) {
@@ -33,7 +33,7 @@ dnnl::memory::desc layout_to_memory_desc(cldnn::layout l, dnnl::memory::format_t
dnnl::algorithm convert_activation_func(cldnn::activation_func func);
cldnn::format find_format(dnnl::memory::desc desc, bool is_grouped = false);
int64_t get_f_offset(cldnn::layout l, dnnl::memory::desc desc);
int64_t get_f_offset(cldnn::layout l, dnnl::memory::desc&& desc);
// If the values in the tensor are identical, make it as per-tensor value
template <typename T>
+1 -1
View File
@@ -865,7 +865,7 @@ Parameter Plugin::GetMetric(const std::string& name, const std::map<std::string,
}
return decltype(ov::optimal_batch_size)::value_type {batch};
} else if (name == ov::device::uuid) {
ov::device::UUID uuid;
ov::device::UUID uuid = {};
std::copy_n(std::begin(device_info.uuid.val), cldnn::device_uuid::max_uuid_size, std::begin(uuid.uuid));
return decltype(ov::device::uuid)::value_type {uuid};
} else if (name == ov::device::full_name) {
@@ -196,7 +196,7 @@ bool is_local_block_io_supported(const cl::Device& device) {
}
device_info init_device_info(const cl::Device& device) {
device_info info;
device_info info = {};
info.vendor_id = static_cast<uint32_t>(device.getInfo<CL_DEVICE_VENDOR_ID>());
info.dev_name = device.getInfo<CL_DEVICE_NAME>();
info.driver_version = device.getInfo<CL_DRIVER_VERSION>();