Skip to content

Commit 8d451d8

Browse files
authored
Fix coverity issues (#3679)
* Fix coverity issues Signed-off-by: szalpal <mszolucha@nvidia.com>
1 parent cda7b65 commit 8d451d8

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

dali/pipeline/data/tensor_list.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -755,7 +755,7 @@ class DLL_PUBLIC TensorList {
755755
}
756756

757757
protected:
758-
Buffer<Backend> data_;
758+
Buffer<Backend> data_ = {};
759759
// We store a set of dimension for each tensor in the list.
760760
// We also pre-compute the offsets of each tensor in the
761761
// underlying allocation for random access

dali/test/dali_test_utils.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ void MakeRandomBatch(TensorList<CPUBackend> &data, int N,
6767
}
6868
}
6969

70-
void CheckResults(DeviceWorkspace ws, int batch_size, int i,
70+
void CheckResults(const DeviceWorkspace& ws, int batch_size, int i,
7171
TensorList<CPUBackend> &data, int output_idx) {
7272
TensorList<CPUBackend> res_cpu;
7373
if (ws.OutputIsType<GPUBackend>(output_idx)) {

dali/test/dali_test_utils.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ void MakeRandomBatch(TensorList<CPUBackend> &data, int N,
5757
* the end.
5858
* @param output_idx Index of the output in the workspace
5959
*/
60-
void CheckResults(DeviceWorkspace ws, int batch_size, int i,
60+
void CheckResults(const DeviceWorkspace& ws, int batch_size, int i,
6161
TensorList<CPUBackend> &data, int output_idx = 0);
6262

6363
} // namespace test

0 commit comments

Comments
 (0)