From 187899a63bfd24cdd598314edfe02a1f647253a5 Mon Sep 17 00:00:00 2001 From: Graham McVicker Date: Mon, 6 Aug 2018 14:52:54 -0700 Subject: [PATCH 1/2] avoid warning by removing always-false if statement in seq.c --- snp2h5/seq.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/snp2h5/seq.c b/snp2h5/seq.c index fc44743..4572f44 100644 --- a/snp2h5/seq.c +++ b/snp2h5/seq.c @@ -192,11 +192,7 @@ void seq_write_fasta_record(Seq *seq, gzFile f) { int line_len; /* write header */ - if(seq->name == NULL) { - gzprintf(f, ">\n"); - } else { - gzprintf(f, ">%s\n", seq->name); - } + gzprintf(f, ">%s\n", seq->name); line_len = 0; From f795d40873aa9485913fabdc97aeff39553a7a36 Mon Sep 17 00:00:00 2001 From: Graham McVicker Date: Mon, 6 Aug 2018 14:53:56 -0700 Subject: [PATCH 2/2] fix mem allocation bug in snp2h5 that could cause haplotypes to be incorrectly written --- snp2h5/snp2h5.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/snp2h5/snp2h5.c b/snp2h5/snp2h5.c index 8e74e88..446951c 100644 --- a/snp2h5/snp2h5.c +++ b/snp2h5/snp2h5.c @@ -485,7 +485,7 @@ void init_h5matrix(H5MatrixInfo *info, void write_h5matrix_row(H5MatrixInfo *info, hsize_t row_num, void *row_data) { hsize_t offset[2]; - hsize_t count[1]; + hsize_t count[2]; herr_t status; /* select a hyperslab that corresponds to a