diff options
| author | Jeffrey Walton <noloader@gmail.com> | 2017-05-08 05:13:55 -0400 |
|---|---|---|
| committer | Jeffrey Walton <noloader@gmail.com> | 2017-05-08 05:13:55 -0400 |
| commit | 798f1c9ed8b1e9d2da6ddc0b15a0b8d797b1088b (patch) | |
| tree | 39f2ded2a41dcba10f03fb4dbe15df14dce36ad7 /validat0.cpp | |
| parent | 238b5e6188e1c6ddcd1de17348daff4f68900aba (diff) | |
| download | cryptopp-git-798f1c9ed8b1e9d2da6ddc0b15a0b8d797b1088b.tar.gz | |
Clear warnings under Visual Studio
Diffstat (limited to 'validat0.cpp')
| -rw-r--r-- | validat0.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/validat0.cpp b/validat0.cpp index 5b239cf8..651c4f82 100644 --- a/validat0.cpp +++ b/validat0.cpp @@ -70,7 +70,7 @@ bool TestCompressors() src.resize(len);
GlobalRNG().GenerateBlock(reinterpret_cast<byte*>(&src[0]), src.size());
- src[0] = 0x1f; src[1] = 0x8b; // magic Header
+ src[0] = (byte)0x1f; src[1] = (byte)0x8b; // magic header
src[2] = 0x00; // extra flags
src[3] = src[3] & (2|4|8|16|32); // flags
@@ -114,7 +114,7 @@ bool TestCompressors() StringSource(dest.substr(0, len-2), true, new Inflator(new StringSink(rec)));
std::cout << "Deflate failed to detect a truncated stream\n";
fail2 = true;
- } catch(const Exception& ex) { }
+ } catch(const Exception&) { }
}
}
catch(const Exception&)
@@ -146,7 +146,7 @@ bool TestCompressors() src.resize(len);
GlobalRNG().GenerateBlock(reinterpret_cast<byte*>(&src[0]), src.size());
- src[0] = 0x1f; src[1] = 0x8b; // magic Header
+ src[0] = (byte)0x1f; src[1] = (byte)0x8b; // magic Header
src[2] = 0x00; // extra flags
src[3] = src[3] & (2|4|8|16|32); // flags
@@ -234,14 +234,14 @@ bool TestEncryptors() StringSource(dest.substr(0, len-2), true, new DefaultDecryptorWithMAC(pwd.c_str(), new StringSink(rec)));
std::cout << "FAILED: DefaultDecryptorWithMAC failed to detect a truncated stream\n";
fail2 = true;
- } catch(const Exception& ex) { }
+ } catch(const Exception&) { }
try {
// tamper salt
dest[DefaultDecryptorWithMAC::SALTLENGTH/2] ^= 0x01;
StringSource(dest, true, new DefaultDecryptorWithMAC(pwd.c_str(), new StringSink(rec)));
std::cout << "FAILED: DefaultDecryptorWithMAC failed to detect a tampered salt\n";
fail2 = true;
- } catch(const Exception& ex) { }
+ } catch(const Exception&) { }
try {
// undo previous tamper
dest[DefaultDecryptorWithMAC::SALTLENGTH/2] ^= 0x01;
@@ -250,7 +250,7 @@ bool TestEncryptors() StringSource(dest, true, new DefaultDecryptorWithMAC(pwd.c_str(), new StringSink(rec)));
std::cout << "FAILED: DefaultDecryptorWithMAC failed to detect a tampered keycheck\n";
fail2 = true;
- } catch(const Exception& ex) { }
+ } catch(const Exception&) { }
try {
// undo previous tamper
dest[DefaultDecryptorWithMAC::SALTLENGTH+DefaultDecryptorWithMAC::KEYLENGTH/2] ^= 0x01;
@@ -259,7 +259,7 @@ bool TestEncryptors() StringSource(dest, true, new DefaultDecryptorWithMAC(pwd.c_str(), new StringSink(rec)));
std::cout << "FAILED: DefaultDecryptorWithMAC failed to detect a tampered data\n";
fail2 = true;
- } catch(const Exception& ex) { }
+ } catch(const Exception&) { }
}
}
catch(const Exception&)
@@ -332,14 +332,14 @@ bool TestEncryptors() StringSource(dest.substr(0, len-2), true, new LegacyDecryptorWithMAC(pwd.c_str(), new StringSink(rec)));
std::cout << "FAILED: LegacyEncryptorWithMAC failed to detect a truncated stream\n";
fail4 = true;
- } catch(const Exception& ex) { }
+ } catch(const Exception&) { }
try {
// tamper salt
dest[LegacyEncryptorWithMAC::SALTLENGTH/2] ^= 0x01;
StringSource(dest, true, new LegacyDecryptorWithMAC(pwd.c_str(), new StringSink(rec)));
std::cout << "FAILED: LegacyEncryptorWithMAC failed to detect a tampered salt\n";
fail4 = true;
- } catch(const Exception& ex) { }
+ } catch(const Exception&) { }
try {
// undo previous tamper
dest[LegacyEncryptorWithMAC::SALTLENGTH/2] ^= 0x01;
@@ -348,7 +348,7 @@ bool TestEncryptors() StringSource(dest, true, new LegacyDecryptorWithMAC(pwd.c_str(), new StringSink(rec)));
std::cout << "FAILED: LegacyEncryptorWithMAC failed to detect a tampered keycheck\n";
fail4 = true;
- } catch(const Exception& ex) { }
+ } catch(const Exception&) { }
try {
// undo previous tamper
dest[LegacyEncryptorWithMAC::SALTLENGTH+LegacyEncryptorWithMAC::KEYLENGTH/2] ^= 0x01;
@@ -357,7 +357,7 @@ bool TestEncryptors() StringSource(dest, true, new LegacyDecryptorWithMAC(pwd.c_str(), new StringSink(rec)));
std::cout << "FAILED: LegacyEncryptorWithMAC failed to detect a tampered data\n";
fail4 = true;
- } catch(const Exception& ex) { }
+ } catch(const Exception&) { }
}
}
catch(const Exception&)
|
