Skip to content

Commit

Permalink
Bug with uninitialised
Browse files Browse the repository at this point in the history
  • Loading branch information
nspope committed Jul 31, 2024
1 parent e08676e commit 5d00273
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions python/_tskitmodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -9943,7 +9943,6 @@ TreeSequence_pair_coalescence_counts(TreeSequence *self, PyObject *args, PyObjec
tsk_size_t num_sample_sets = 0;
tsk_size_t num_windows = 0;
tsk_size_t num_time_windows = 0;
tsk_size_t num_nodes = tsk_treeseq_get_num_nodes(self->tree_sequence);
int span_normalise = 0;
int err;

Expand All @@ -9964,7 +9963,6 @@ TreeSequence_pair_coalescence_counts(TreeSequence *self, PyObject *args, PyObjec
goto out;
}
if (parse_set_indexes(py_indexes, &indexes_array, &num_indexes, 2) != 0) {
// TODO add check for OOR sample set
goto out;

Check warning on line 9966 in python/_tskitmodule.c

View check run for this annotation

Codecov / codecov/patch

python/_tskitmodule.c#L9966

Added line #L9966 was not covered by tests
}
if (parse_time_windows(py_time_windows, &time_windows_array, &num_time_windows)
Expand All @@ -9975,6 +9973,7 @@ TreeSequence_pair_coalescence_counts(TreeSequence *self, PyObject *args, PyObjec
options |= TSK_STAT_SPAN_NORMALISE;
}

tsk_size_t num_nodes = tsk_treeseq_get_num_nodes(self->tree_sequence);
npy_intp dims[3];
dims[0] = num_windows;
dims[1] = num_time_windows > 0 ? num_time_windows : num_nodes;
Expand Down

0 comments on commit 5d00273

Please sign in to comment.