Skip to content

Commit

Permalink
Fix unused variable warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
ch4rr0 committed Jul 8, 2020
1 parent e78f80c commit 1347220
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 24 deletions.
2 changes: 1 addition & 1 deletion ebwt.h
Original file line number Diff line number Diff line change
Expand Up @@ -487,7 +487,7 @@ class Ebwt {
isaRate,
ftabChars,
refparams.reverse == REF_READ_REVERSE,
false /* is this a bt2 index? */)
isBt2Index)
{
_packed = packed;
#ifdef POPCNT_CAPABILITY
Expand Down
12 changes: 5 additions & 7 deletions ebwt_search.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1381,7 +1381,7 @@ static void exactSearch(PatternComposer& _patsrc,
for(int i = 0; i < nthreads; i++) {
tids[i] = i;
#if (__cplusplus >= 201103L)
tps[i].tid = i;
tps[i].tid = tids[i];
tps[i].done = &all_threads_done;
if (i == nthreads - 1) {
if(stateful) {
Expand Down Expand Up @@ -1762,7 +1762,7 @@ static void mismatchSearchFull(PatternComposer& _patsrc,
for(int i = 0; i < nthreads; i++) {
tids[i] = i;
#if (__cplusplus >= 201103L)
tps[i].tid = i;
tps[i].tid = tids[i];
tps[i].done = &all_threads_done;
if (i == nthreads - 1) {
if(stateful) {
Expand Down Expand Up @@ -2258,7 +2258,7 @@ static void twoOrThreeMismatchSearchFull(
for(int i = 0; i < nthreads; i++) {
tids[i] = i;
#if (__cplusplus >= 201103L)
tps[i].tid = i;
tps[i].tid = tids[i];
tps[i].done = &all_threads_done;
if (i == nthreads - 1) {
if(stateful) {
Expand Down Expand Up @@ -2804,7 +2804,7 @@ static void seededQualCutoffSearchFull(
for(int i = 0; i < nthreads; i++) {
tids[i] = i;
#if (__cplusplus >= 201103L)
tps[i].tid = i;
tps[i].tid = tids[i];
tps[i].done = &all_threads_done;
if (i == nthreads - 1) {
if(stateful) {
Expand Down Expand Up @@ -2920,9 +2920,7 @@ patsrcFromStrings(int format,
switch(format) {
case FASTA:
return new FastaPatternSource (reads, quals,
trim3, trim5,
solexaQuals, phred64Quals,
integerQuals);
trim3, trim5);
case FASTA_CONT:
return new FastaContinuousPatternSource (
reads, fastaContLen,
Expand Down
13 changes: 2 additions & 11 deletions pat.h
Original file line number Diff line number Diff line change
Expand Up @@ -464,19 +464,13 @@ class FastaPatternSource : public CFilePatternSource {
const EList<string>& infiles,
const EList<string>* qinfiles,
int trim3 = 0,
int trim5 = 0,
bool solexa64 = false,
bool phred64 = false,
bool intQuals = false) :
int trim5 = 0) :
CFilePatternSource(
infiles,
qinfiles,
trim3,
trim5),
first_(true),
solexa64_(solexa64),
phred64_(phred64),
intQuals_(intQuals) { }
first_(true) { }

/**
* Reset so that next call to nextBatch* gets the first batch.
Expand Down Expand Up @@ -520,9 +514,6 @@ class FastaPatternSource : public CFilePatternSource {
private:

bool first_;
bool solexa64_;
bool phred64_;
bool intQuals_;
};


Expand Down
9 changes: 6 additions & 3 deletions range_cache.h
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,8 @@ class RangeCacheEntry {
// Get the pointer to the entries themselves
ents_ = ents + 1;
}
assert(sanityCheckEnts());
if (sanity_)
assert(sanityCheckEnts());
}

/**
Expand All @@ -203,7 +204,8 @@ class RangeCacheEntry {
// Get the pointer to the entries themselves
ents_ = ents + 1;
assert_leq(top_ + len_, ebwt_->_eh._len);
assert(sanityCheckEnts());
if (sanity_)
assert(sanityCheckEnts());
}

TIndexOffU len() const {
Expand Down Expand Up @@ -401,7 +403,8 @@ class RangeCache {
}
TIndexOffU len = ents[0];
assert_leq(top + len, ebwt_->_eh._len);
RangeCacheEntry::sanityCheckEnts(len, ents + 1, ebwt_);
if (sanity_)
RangeCacheEntry::sanityCheckEnts(len, ents + 1, ebwt_);
}
#endif
return true;
Expand Down
2 changes: 0 additions & 2 deletions read.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ struct Read {
patRcRev.clear();
qualRev.clear();
name.clear();
preservedOptFlags.clear();
filter = '?';
seed = 0;
parsed = false;
Expand Down Expand Up @@ -259,7 +258,6 @@ struct Read {
TBuf readOrigBuf;

BTString name; // read name
BTString preservedOptFlags;
TReadId rdid; // 0-based id based on pair's offset in read file(s)
int mate; // 0 = single-end, 1 = mate1, 2 = mate2
uint32_t seed; // random seed
Expand Down

0 comments on commit 1347220

Please sign in to comment.