File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -212,7 +212,7 @@ tsk_haplotype_build_mutation_index(tsk_haplotype_t *self)
212212 }
213213 self -> node_mutation_offsets [0 ] = 0 ;
214214 for (j = 0 ; j < self -> num_nodes ; j ++ ) {
215- total_mutations += counts [j ];
215+ total_mutations += ( tsk_size_t ) counts [j ];
216216 if (total_mutations > INT32_MAX ) {
217217 ret = tsk_trace_error (TSK_ERR_UNSUPPORTED_OPERATION );
218218 goto out ;
@@ -281,7 +281,7 @@ tsk_haplotype_build_ancestral_states(tsk_haplotype_t *self)
281281 }
282282
283283 self -> ancestral_states
284- = tsk_malloc (self -> num_sites * sizeof (* self -> ancestral_states ));
284+ = tsk_malloc (( tsk_size_t ) self -> num_sites * sizeof (* self -> ancestral_states ));
285285 if (self -> ancestral_states == NULL ) {
286286 return tsk_trace_error (TSK_ERR_NO_MEMORY );
287287 }
You can’t perform that action at this time.
0 commit comments