Skip to content

Commit

Permalink
Clear clang-tidy warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
noloader committed Jan 2, 2018
1 parent 5f083d6 commit 5872649
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 10 deletions.
6 changes: 2 additions & 4 deletions eccrypto.cpp
Expand Up @@ -100,9 +100,8 @@ template<> struct EcRecommendedParameters<EC2N>
};

OID oid;
unsigned int t0, t1, t2, t3, t4;
const char *a, *b, *g, *n;
unsigned int h;
unsigned int h, t0, t1, t2, t3, t4;
};

template<> struct EcRecommendedParameters<ECP>
Expand All @@ -118,8 +117,7 @@ template<> struct EcRecommendedParameters<ECP>
};

OID oid;
const char *p;
const char *a, *b, *g, *n;
const char *p, *a, *b, *g, *n;
unsigned int h;
};

Expand Down
1 change: 0 additions & 1 deletion rc6.cpp
Expand Up @@ -87,7 +87,6 @@ void RC6::Dec::ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byt
a = rotrMod(a-sptr[0], u) ^ t;
}

sptr -= 2;
d -= sTable[1];
b -= sTable[0];

Expand Down
4 changes: 3 additions & 1 deletion rng.cpp
Expand Up @@ -85,7 +85,9 @@ X917RNG::X917RNG(BlockTransformation *c, const byte *seed, const byte *determini
}

// for FIPS 140-2
GenerateBlock(m_lastBlock, m_size);
// GenerateBlock(m_lastBlock, m_size);
ArraySink target(m_lastBlock, m_size);
GenerateIntoBufferedTransformation(target, DEFAULT_CHANNEL, m_size);
}

void X917RNG::GenerateIntoBufferedTransformation(BufferedTransformation &target, const std::string &channel, lword size)
Expand Down
7 changes: 3 additions & 4 deletions validat1.cpp
Expand Up @@ -2782,10 +2782,9 @@ bool ValidateSerpent()
std::cout << (pass1 && pass2 ? "passed:" : "FAILED:") << " Algorithm key lengths\n";

FileSource valdata(CRYPTOPP_DATA_DIR "TestData/serpentv.dat", true, new HexDecoder);
bool pass = true;
pass = BlockTransformationTest(FixedRoundsCipherFactory<SerpentEncryption, SerpentDecryption>(16), valdata, 5) && pass;
pass = BlockTransformationTest(FixedRoundsCipherFactory<SerpentEncryption, SerpentDecryption>(24), valdata, 4) && pass;
pass = BlockTransformationTest(FixedRoundsCipherFactory<SerpentEncryption, SerpentDecryption>(32), valdata, 3) && pass;
pass3 = BlockTransformationTest(FixedRoundsCipherFactory<SerpentEncryption, SerpentDecryption>(16), valdata, 5) && pass3;
pass3 = BlockTransformationTest(FixedRoundsCipherFactory<SerpentEncryption, SerpentDecryption>(24), valdata, 4) && pass3;
pass3 = BlockTransformationTest(FixedRoundsCipherFactory<SerpentEncryption, SerpentDecryption>(32), valdata, 3) && pass3;
return pass1 && pass2 && pass3;
}

Expand Down

0 comments on commit 5872649

Please sign in to comment.