Permalink
Browse files

Remove some warning

  • Loading branch information...
martin-steinegger committed Nov 29, 2017
1 parent bc2a17b commit 6cb957014bb45c5b3bb12652a8fdce44b723de43
View
@@ -67,7 +67,7 @@ namespace {
}
void Random::seed (long x)
{
register size_t i;
size_t i;
state [0] = x;
@@ -85,7 +85,7 @@ void Random::seed (long x)
long Random::number () // uniform random x : 0 <= x <= exp2 (31) - 1
{
register long r;
long r;
r = *rK;
r += *rJ--;
View
@@ -125,7 +125,8 @@ class MathUtil {
return static_cast<float>(end - start + 1) / static_cast<float>(length);
}
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconstant-conversion"
/** A single gain expressed as minifloat */
typedef uint16_t gain_minifloat_t;
#define EXPONENT_BITS 3
@@ -140,7 +141,6 @@ class MathUtil {
#if EXPONENT_BITS + MANTISSA_BITS != 8
#error EXPONENT_BITS and MANTISSA_BITS must sum to 16
#endif
static char convertFloatToChar(float v)
{
if (std::isnan(v) || v <= 0.0f) {
@@ -167,6 +167,7 @@ class MathUtil {
unsigned char retVal = static_cast<char>((neff - 1 )/19 * MINIFLOAT_MAX);
return std::max(static_cast<unsigned char>(1), retVal);
}
#pragma GCC diagnostic pop
// compute look up table based on stirling approximation
static void computeFactorial(double *output, const size_t range) {
View
@@ -260,7 +260,10 @@ Orf::SequenceLocation Orf::parseOrfHeader(char *data) {
}
Orf::SequenceLocation loc;
int strand;
int retCode = sscanf(entry[col], "[Orf: %zu, %zu, %d, %d, %d]", &loc.from, &loc.to, &strand, &loc.hasIncompleteStart, &loc.hasIncompleteEnd);
int hasIncompleteStart, hasIncompleteEnd;
int retCode = sscanf(entry[col], "[Orf: %zu, %zu, %d, %d, %d]", &loc.from, &loc.to, &strand, &hasIncompleteStart, &hasIncompleteEnd);
loc.hasIncompleteStart = hasIncompleteStart;
loc.hasIncompleteEnd = hasIncompleteEnd;
if(retCode < 5){
Debug(Debug::ERROR) << "Could not parse Orf " << entry[col] << ".\n";
EXIT(EXIT_FAILURE);
@@ -204,19 +204,19 @@ void SubstitutionMatrix::setupLetterMapping(){
case 'W':
case 'Y':
case 'X':
this->aa2int[letter] = this->aa2int[upperLetter];
this->aa2int[static_cast<int>(letter)] = this->aa2int[static_cast<int>(upperLetter)];
break;
case 'J':
this->aa2int[letter] = this->aa2int[(int)'L'];
this->aa2int[static_cast<int>(letter)] = this->aa2int[(int)'L'];
break;
case 'U':
case 'O':
this->aa2int[letter] = this->aa2int[(int)'X'];
this->aa2int[static_cast<int>(letter)] = this->aa2int[(int)'X'];
break;
case 'Z': this->aa2int[letter] = this->aa2int[(int)'E']; break;
case 'B': this->aa2int[letter] = this->aa2int[(int)'D']; break;
case 'Z': this->aa2int[static_cast<int>(letter)] = this->aa2int[(int)'E']; break;
case 'B': this->aa2int[static_cast<int>(letter)] = this->aa2int[(int)'D']; break;
default:
this->aa2int[letter] = this->aa2int[(int)'X'];
this->aa2int[static_cast<int>(letter)] = this->aa2int[(int)'X'];
break;
}
}
@@ -346,7 +346,7 @@ int SubstitutionMatrix::readProbMatrix(const std::string &matrixData) {
Debug(Debug::ERROR) << "Computing inverse of substitution matrix failed\n";
EXIT(EXIT_FAILURE);
}
pBack[aa2int['X']]=ANY_BACK;
pBack[aa2int[(int)'X']]=ANY_BACK;
}
if(xIsPositive == false){
for (int i = 0; i < alphabetSize - 1; i++) {
@@ -37,19 +37,19 @@ class ReducedMatrix : public BaseMatrix {
case 'W':
case 'Y':
case 'X':
this->aa2int[letter] = this->aa2int[upperLetter];
this->aa2int[static_cast<int>(letter)] = this->aa2int[static_cast<int>(upperLetter)];
break;
case 'J':
this->aa2int[letter] = this->aa2int[(int)'L'];
this->aa2int[static_cast<int>(letter)] = this->aa2int[(int)'L'];
break;
case 'U':
case 'O':
this->aa2int[letter] = this->aa2int[(int)'X'];
this->aa2int[static_cast<int>(letter)] = this->aa2int[(int)'X'];
break;
case 'Z': this->aa2int[letter] = this->aa2int[(int)'E']; break;
case 'B': this->aa2int[letter] = this->aa2int[(int)'D']; break;
case 'Z': this->aa2int[static_cast<int>(letter)] = this->aa2int[(int)'E']; break;
case 'B': this->aa2int[static_cast<int>(letter)] = this->aa2int[(int)'D']; break;
default:
this->aa2int[letter] = this->aa2int[(int)'X'];
this->aa2int[static_cast<int>(letter)] = this->aa2int[(int)'X'];
break;
}
}
View
@@ -158,7 +158,7 @@ int search(int argc, const char **argv, const Command& command) {
}
cmd.addVariable("SENSE_0", SSTR(par.startSens).c_str());
float sensStepSize = (par.sensitivity - par.startSens)/ (static_cast<float>(par.sensSteps)-1);
for(size_t step = 1; step < par.sensSteps; step++){
for(int step = 1; step < par.sensSteps; step++){
std::string stepKey = "SENSE_" + SSTR(step);
float stepSense = par.startSens + sensStepSize * step;
std::stringstream stream;

0 comments on commit 6cb9570

Please sign in to comment.