Skip to content

Commit

Permalink
Merge pull request #1539 from IntelPython/fix-coverity-issue-uninitia…
Browse files Browse the repository at this point in the history
…lized-class-member

Fix coverity issue uninitialized class member
  • Loading branch information
oleksandr-pavlyk authored Feb 8, 2024
2 parents 4e95dc3 + 4e520c6 commit 8757289
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
7 changes: 4 additions & 3 deletions dpctl/apis/include/dpctl4pybind11.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -246,9 +246,10 @@ class dpctl_capi
UsmNDArray_MakeSimpleFromPtr_(nullptr),
UsmNDArray_MakeFromPtr_(nullptr), USM_ARRAY_C_CONTIGUOUS_(0),
USM_ARRAY_F_CONTIGUOUS_(0), USM_ARRAY_WRITABLE_(0), UAR_BOOL_(-1),
UAR_SHORT_(-1), UAR_USHORT_(-1), UAR_INT_(-1), UAR_UINT_(-1),
UAR_LONG_(-1), UAR_ULONG_(-1), UAR_LONGLONG_(-1), UAR_ULONGLONG_(-1),
UAR_FLOAT_(-1), UAR_DOUBLE_(-1), UAR_CFLOAT_(-1), UAR_CDOUBLE_(-1),
UAR_BYTE_(-1), UAR_UBYTE_(-1), UAR_SHORT_(-1), UAR_USHORT_(-1),
UAR_INT_(-1), UAR_UINT_(-1), UAR_LONG_(-1), UAR_ULONG_(-1),
UAR_LONGLONG_(-1), UAR_ULONGLONG_(-1), UAR_FLOAT_(-1),
UAR_DOUBLE_(-1), UAR_CFLOAT_(-1), UAR_CDOUBLE_(-1),
UAR_TYPE_SENTINEL_(-1), UAR_HALF_(-1), UAR_INT8_(-1), UAR_UINT8_(-1),
UAR_INT16_(-1), UAR_UINT16_(-1), UAR_INT32_(-1), UAR_UINT32_(-1),
UAR_INT64_(-1), UAR_UINT64_(-1), default_sycl_queue_{},
Expand Down
5 changes: 5 additions & 0 deletions dpctl/tensor/libtensor/include/utils/offset_utils.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -449,6 +449,11 @@ struct ThreeZeroOffsets_Indexer
{
return ThreeOffsets<ssize_t>();
}

constexpr ThreeOffsets<ssize_t> operator()(std::size_t) const
{
return ThreeOffsets<ssize_t>();
}
};

template <typename FirstIndexerT,
Expand Down

0 comments on commit 8757289

Please sign in to comment.