Skip to content

Commit

Permalink
maybe-uninitialized warning
Browse files Browse the repository at this point in the history
  • Loading branch information
chrchang committed Nov 24, 2024
1 parent 3e48c2a commit 5eab376
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions 2.0/plink2_pvar.cc
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,7 @@ BoolErr VaridTemplateApply(unsigned char* tmp_alloc_base, const VaridTemplate* v
uint32_t cur_overflow = 0;
const char* tmp_allele_ptrs[2]; // [0] = RefOr1, [1] = AltOr2
tmp_allele_ptrs[0] = nullptr;
tmp_allele_ptrs[1] = nullptr; // maybe-uninitialized warning
if (ref_or_1_exists) {
ref_slen = ref_token_slen;
if (ref_slen > new_id_max_allele_slen) {
Expand Down Expand Up @@ -422,6 +423,7 @@ char* VaridTemplateWrite(const VaridTemplate* vtp, const char* ref_start, const
uint32_t cur_max_overflow_slen = 0;
const char* tmp_allele_ptrs[2];
tmp_allele_ptrs[0] = nullptr;
tmp_allele_ptrs[1] = nullptr;
if (ref_or_1_exists) {
ref_slen = ref_token_slen;
if (ref_slen > new_id_max_allele_slen) {
Expand Down

0 comments on commit 5eab376

Please sign in to comment.