removed a few unused variables
These variables have been assigned but never actually used. Reported by gcc-4.7. Lower version cannot give such warnings.
This commit is contained in:
parent
6230f86799
commit
904c3205c0
|
|
@ -59,12 +59,9 @@ void QSufSortSuffixSort(qsint_t* __restrict V, qsint_t* __restrict I, const qsin
|
||||||
qsint_t i, j;
|
qsint_t i, j;
|
||||||
qsint_t s, negatedSortedGroupLength;
|
qsint_t s, negatedSortedGroupLength;
|
||||||
qsint_t numSymbolAggregated;
|
qsint_t numSymbolAggregated;
|
||||||
qsint_t maxNumInputSymbol;
|
|
||||||
qsint_t numSortedPos = 1;
|
qsint_t numSortedPos = 1;
|
||||||
qsint_t newAlphabetSize;
|
qsint_t newAlphabetSize;
|
||||||
|
|
||||||
maxNumInputSymbol = largestInputSymbol - smallestInputSymbol + 1;
|
|
||||||
|
|
||||||
if (!skipTransform) {
|
if (!skipTransform) {
|
||||||
/* bucketing possible*/
|
/* bucketing possible*/
|
||||||
newAlphabetSize = QSufSortTransform(V, I, numChar, largestInputSymbol, smallestInputSymbol,
|
newAlphabetSize = QSufSortTransform(V, I, numChar, largestInputSymbol, smallestInputSymbol,
|
||||||
|
|
|
||||||
10
bwamem.c
10
bwamem.c
|
|
@ -418,7 +418,7 @@ static inline int cal_max_gap(const mem_opt_t *opt, int qlen)
|
||||||
void mem_chain2aln(const mem_opt_t *opt, int64_t l_pac, const uint8_t *pac, int l_query, const uint8_t *query, const mem_chain_t *c, mem_alnreg_v *av)
|
void mem_chain2aln(const mem_opt_t *opt, int64_t l_pac, const uint8_t *pac, int l_query, const uint8_t *query, const mem_chain_t *c, mem_alnreg_v *av)
|
||||||
{ // FIXME: in general, we SHOULD check funny seed patterns such as contained seeds. When that happens, we should use a SW or extend more seeds
|
{ // FIXME: in general, we SHOULD check funny seed patterns such as contained seeds. When that happens, we should use a SW or extend more seeds
|
||||||
int i, k;
|
int i, k;
|
||||||
int64_t rlen, rmax[2], tmp, max = 0, max_i = 0;
|
int64_t rlen, rmax[2], tmp, max = 0;
|
||||||
const mem_seed_t *s;
|
const mem_seed_t *s;
|
||||||
uint8_t *rseq = 0;
|
uint8_t *rseq = 0;
|
||||||
|
|
||||||
|
|
@ -432,7 +432,7 @@ void mem_chain2aln(const mem_opt_t *opt, int64_t l_pac, const uint8_t *pac, int
|
||||||
e = t->rbeg + t->len + ((l_query - t->qbeg - t->len) + cal_max_gap(opt, l_query - t->qbeg - t->len));
|
e = t->rbeg + t->len + ((l_query - t->qbeg - t->len) + cal_max_gap(opt, l_query - t->qbeg - t->len));
|
||||||
rmax[0] = rmax[0] < b? rmax[0] : b;
|
rmax[0] = rmax[0] < b? rmax[0] : b;
|
||||||
rmax[1] = rmax[1] > e? rmax[1] : e;
|
rmax[1] = rmax[1] > e? rmax[1] : e;
|
||||||
if (t->len > max) max = t->len, max_i = i;
|
if (t->len > max) max = t->len;
|
||||||
}
|
}
|
||||||
// retrieve the reference sequence
|
// retrieve the reference sequence
|
||||||
rseq = bns_get_seq(l_pac, pac, rmax[0], rmax[1], &rlen);
|
rseq = bns_get_seq(l_pac, pac, rmax[0], rmax[1], &rlen);
|
||||||
|
|
@ -523,7 +523,7 @@ ret_gen_cigar:
|
||||||
void bwa_hit2sam(kstring_t *str, const int8_t mat[25], int q, int r, int w, const bntseq_t *bns, const uint8_t *pac, bseq1_t *s, const bwahit_t *p_, int is_hard, const bwahit_t *m)
|
void bwa_hit2sam(kstring_t *str, const int8_t mat[25], int q, int r, int w, const bntseq_t *bns, const uint8_t *pac, bseq1_t *s, const bwahit_t *p_, int is_hard, const bwahit_t *m)
|
||||||
{
|
{
|
||||||
#define is_mapped(x) ((x)->rb >= 0 && (x)->rb < (x)->re && (x)->re <= bns->l_pac<<1)
|
#define is_mapped(x) ((x)->rb >= 0 && (x)->rb < (x)->re && (x)->re <= bns->l_pac<<1)
|
||||||
int score, n_cigar, is_rev = 0, nn, rid, mid, copy_mate = 0;
|
int score, n_cigar, is_rev = 0, rid, mid, copy_mate = 0;
|
||||||
uint32_t *cigar = 0;
|
uint32_t *cigar = 0;
|
||||||
int64_t pos;
|
int64_t pos;
|
||||||
bwahit_t ptmp, *p = &ptmp;
|
bwahit_t ptmp, *p = &ptmp;
|
||||||
|
|
@ -548,7 +548,7 @@ void bwa_hit2sam(kstring_t *str, const int8_t mat[25], int q, int r, int w, cons
|
||||||
p->flag |= n_cigar == 0? 4 : 0; // FIXME: check why this may happen (this has already happened)
|
p->flag |= n_cigar == 0? 4 : 0; // FIXME: check why this may happen (this has already happened)
|
||||||
} else n_cigar = 0, cigar = 0;
|
} else n_cigar = 0, cigar = 0;
|
||||||
pos = bns_depos(bns, p->rb < bns->l_pac? p->rb : p->re - 1, &is_rev);
|
pos = bns_depos(bns, p->rb < bns->l_pac? p->rb : p->re - 1, &is_rev);
|
||||||
nn = bns_cnt_ambi(bns, pos, p->re - p->rb, &rid);
|
bns_cnt_ambi(bns, pos, p->re - p->rb, &rid);
|
||||||
kputw(p->flag, str); kputc('\t', str);
|
kputw(p->flag, str); kputc('\t', str);
|
||||||
kputs(bns->anns[rid].name, str); kputc('\t', str); kputuw(pos - bns->anns[rid].offset + 1, str); kputc('\t', str);
|
kputs(bns->anns[rid].name, str); kputc('\t', str); kputuw(pos - bns->anns[rid].offset + 1, str); kputc('\t', str);
|
||||||
kputw(p->qual, str); kputc('\t', str);
|
kputw(p->qual, str); kputc('\t', str);
|
||||||
|
|
@ -569,7 +569,7 @@ void bwa_hit2sam(kstring_t *str, const int8_t mat[25], int q, int r, int w, cons
|
||||||
}
|
}
|
||||||
if (m && is_mapped(m)) { // then print mate pos and isize
|
if (m && is_mapped(m)) { // then print mate pos and isize
|
||||||
pos = bns_depos(bns, m->rb < bns->l_pac? m->rb : m->re - 1, &is_rev);
|
pos = bns_depos(bns, m->rb < bns->l_pac? m->rb : m->re - 1, &is_rev);
|
||||||
nn = bns_cnt_ambi(bns, pos, m->re - m->rb, &mid);
|
bns_cnt_ambi(bns, pos, m->re - m->rb, &mid);
|
||||||
kputc('\t', str);
|
kputc('\t', str);
|
||||||
if (mid == rid) kputc('=', str);
|
if (mid == rid) kputc('=', str);
|
||||||
else kputs(bns->anns[mid].name, str);
|
else kputs(bns->anns[mid].name, str);
|
||||||
|
|
|
||||||
8
bwase.c
8
bwase.c
|
|
@ -71,8 +71,8 @@ void bwa_aln2seq_core(int n_aln, const bwt_aln1_t *aln, bwa_seq_t *s, int set_ma
|
||||||
}
|
}
|
||||||
rest -= q->l - q->k + 1;
|
rest -= q->l - q->k + 1;
|
||||||
} else { // Random sampling (http://code.activestate.com/recipes/272884/). In fact, we never come here.
|
} else { // Random sampling (http://code.activestate.com/recipes/272884/). In fact, we never come here.
|
||||||
int j, i, k;
|
int j, i;
|
||||||
for (j = rest, i = q->l - q->k + 1, k = 0; j > 0; --j) {
|
for (j = rest, i = q->l - q->k + 1; j > 0; --j) {
|
||||||
double p = 1.0, x = drand48();
|
double p = 1.0, x = drand48();
|
||||||
while (x < p) p -= p * j / (i--);
|
while (x < p) p -= p * j / (i--);
|
||||||
s->multi[z].pos = q->l - i;
|
s->multi[z].pos = q->l - i;
|
||||||
|
|
@ -412,11 +412,11 @@ void bwa_print_sam1(const bntseq_t *bns, bwa_seq_t *p, const bwa_seq_t *mate, in
|
||||||
|
|
||||||
// print mate coordinate
|
// print mate coordinate
|
||||||
if (mate && mate->type != BWA_TYPE_NO_MATCH) {
|
if (mate && mate->type != BWA_TYPE_NO_MATCH) {
|
||||||
int m_seqid, m_is_N;
|
int m_seqid;
|
||||||
long long isize;
|
long long isize;
|
||||||
am = mate->seQ < p->seQ? mate->seQ : p->seQ; // smaller single-end mapping quality
|
am = mate->seQ < p->seQ? mate->seQ : p->seQ; // smaller single-end mapping quality
|
||||||
// redundant calculation here, but should not matter too much
|
// redundant calculation here, but should not matter too much
|
||||||
m_is_N = bns_cnt_ambi(bns, mate->pos, mate->len, &m_seqid);
|
bns_cnt_ambi(bns, mate->pos, mate->len, &m_seqid);
|
||||||
err_printf("\t%s\t", (seqid == m_seqid)? "=" : bns->anns[m_seqid].name);
|
err_printf("\t%s\t", (seqid == m_seqid)? "=" : bns->anns[m_seqid].name);
|
||||||
isize = (seqid == m_seqid)? pos_5(mate) - pos_5(p) : 0;
|
isize = (seqid == m_seqid)? pos_5(mate) - pos_5(p) : 0;
|
||||||
if (p->type == BWA_TYPE_NO_MATCH) isize = 0;
|
if (p->type == BWA_TYPE_NO_MATCH) isize = 0;
|
||||||
|
|
|
||||||
|
|
@ -186,14 +186,14 @@ static void gen_cigar(const bsw2opt_t *opt, int lq, uint8_t *seq[2], const uint8
|
||||||
bsw2aux_t *q = b->aux + i;
|
bsw2aux_t *q = b->aux + i;
|
||||||
uint8_t *query;
|
uint8_t *query;
|
||||||
bwtint_t k;
|
bwtint_t k;
|
||||||
int score, path_len, beg, end;
|
int path_len, beg, end;
|
||||||
if (p->l) continue;
|
if (p->l) continue;
|
||||||
beg = (p->flag & 0x10)? lq - p->end : p->beg;
|
beg = (p->flag & 0x10)? lq - p->end : p->beg;
|
||||||
end = (p->flag & 0x10)? lq - p->beg : p->end;
|
end = (p->flag & 0x10)? lq - p->beg : p->end;
|
||||||
query = seq[(p->flag & 0x10)? 1 : 0] + beg;
|
query = seq[(p->flag & 0x10)? 1 : 0] + beg;
|
||||||
for (k = p->k; k < p->k + p->len; ++k) // in principle, no out-of-boundary here
|
for (k = p->k; k < p->k + p->len; ++k) // in principle, no out-of-boundary here
|
||||||
target[k - p->k] = pac[k>>2] >> (~k&3)*2 & 0x3;
|
target[k - p->k] = pac[k>>2] >> (~k&3)*2 & 0x3;
|
||||||
score = aln_global_core(target, p->len, query, end - beg, &par, path, &path_len);
|
aln_global_core(target, p->len, query, end - beg, &par, path, &path_len);
|
||||||
q->cigar = aln_path2cigar32(path, path_len, &q->n_cigar);
|
q->cigar = aln_path2cigar32(path, path_len, &q->n_cigar);
|
||||||
#if 0
|
#if 0
|
||||||
if (name && score != p->G) { // debugging only
|
if (name && score != p->G) { // debugging only
|
||||||
|
|
|
||||||
6
stdaln.c
6
stdaln.c
|
|
@ -542,13 +542,12 @@ int aln_local_core(unsigned char *seq1, int len1, unsigned char *seq2, int len2,
|
||||||
int start, end, max_score;
|
int start, end, max_score;
|
||||||
int thres, *suba, *ss;
|
int thres, *suba, *ss;
|
||||||
|
|
||||||
int gap_open, gap_ext, b;
|
int gap_open, gap_ext;
|
||||||
int *score_matrix, N_MATRIX_ROW;
|
int *score_matrix, N_MATRIX_ROW;
|
||||||
|
|
||||||
/* initialize some align-related parameters. just for compatibility */
|
/* initialize some align-related parameters. just for compatibility */
|
||||||
gap_open = ap->gap_open;
|
gap_open = ap->gap_open;
|
||||||
gap_ext = ap->gap_ext;
|
gap_ext = ap->gap_ext;
|
||||||
b = ap->band_width;
|
|
||||||
score_matrix = ap->matrix;
|
score_matrix = ap->matrix;
|
||||||
N_MATRIX_ROW = ap->row;
|
N_MATRIX_ROW = ap->row;
|
||||||
thres = _thres > 0? _thres : -_thres;
|
thres = _thres > 0? _thres : -_thres;
|
||||||
|
|
@ -862,7 +861,7 @@ uint16_t *aln_path2cigar(const path_t *path, int path_len, int *n_cigar)
|
||||||
int aln_extend_core(unsigned char *seq1, int len1, unsigned char *seq2, int len2, const AlnParam *ap,
|
int aln_extend_core(unsigned char *seq1, int len1, unsigned char *seq2, int len2, const AlnParam *ap,
|
||||||
path_t *path, int *path_len, int G0, uint8_t *_mem)
|
path_t *path, int *path_len, int G0, uint8_t *_mem)
|
||||||
{
|
{
|
||||||
int q, r, qr, tmp_len;
|
int q, r, qr;
|
||||||
int32_t **s_array, *score_array;
|
int32_t **s_array, *score_array;
|
||||||
int is_overflow, of_base;
|
int is_overflow, of_base;
|
||||||
uint32_t *eh;
|
uint32_t *eh;
|
||||||
|
|
@ -889,7 +888,6 @@ int aln_extend_core(unsigned char *seq1, int len1, unsigned char *seq2, int len2
|
||||||
s_array[i] = (int32_t*)_p, _p += 4 * len1;
|
s_array[i] = (int32_t*)_p, _p += 4 * len1;
|
||||||
/* initialization */
|
/* initialization */
|
||||||
aln_init_score_array(seq1, len1, N_MATRIX_ROW, score_matrix, s_array);
|
aln_init_score_array(seq1, len1, N_MATRIX_ROW, score_matrix, s_array);
|
||||||
tmp_len = len1 + 1;
|
|
||||||
start = 1; end = 2;
|
start = 1; end = 2;
|
||||||
end_i = end_j = 0;
|
end_i = end_j = 0;
|
||||||
score = 0;
|
score = 0;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue