aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorRichard van der Hoff <richard@matrix.org>2016-05-18 18:03:28 +0100
committerRichard van der Hoff <richard@matrix.org>2016-05-23 18:08:22 +0100
commite21d5cb2229c8c868fad896c08e7c25c103b824a (patch)
tree276b6e10159876c3874a8d7ee5ef64f60411b036 /tests
parentea130cae0db3d68a49ae2059b2568eb8504e84b6 (diff)
Fix warnings and set -Werror
Diffstat (limited to 'tests')
-rw-r--r--tests/test_olm_decrypt.cpp2
-rw-r--r--tests/test_ratchet.cpp4
2 files changed, 3 insertions, 3 deletions
diff --git a/tests/test_olm_decrypt.cpp b/tests/test_olm_decrypt.cpp
index 2a2db98..4ec873c 100644
--- a/tests/test_olm_decrypt.cpp
+++ b/tests/test_olm_decrypt.cpp
@@ -67,7 +67,7 @@ int main() {
{
TestCase my_test("Olm decrypt test");
-for (int i = 0; i < sizeof(test_cases)/ sizeof(const char *); ++i) {
+for (unsigned int i = 0; i < sizeof(test_cases)/ sizeof(const char *); ++i) {
decrypt_case(0, test_cases[i]);
}
diff --git a/tests/test_ratchet.cpp b/tests/test_ratchet.cpp
index cbb3c52..8f89048 100644
--- a/tests/test_ratchet.cpp
+++ b/tests/test_ratchet.cpp
@@ -195,7 +195,7 @@ std::uint8_t random[] = "This is a random 32 byte string";
for (unsigned i = 0; i < 8; ++i) {
{
std::uint8_t msg[alice.encrypt_output_length(sizeof(plaintext))];
- std::uint8_t encrypt_length = alice.encrypt(
+ alice.encrypt(
plaintext, 15, random, 32, msg, sizeof(msg)
);
std::uint8_t output[bob.decrypt_max_plaintext_length(msg, sizeof(msg))];
@@ -206,7 +206,7 @@ for (unsigned i = 0; i < 8; ++i) {
random[31]++;
{
std::uint8_t msg[bob.encrypt_output_length(sizeof(plaintext))];
- std::uint8_t encrypt_length = bob.encrypt(
+ bob.encrypt(
plaintext, 15, random, 32, msg, sizeof(msg)
);
std::uint8_t output[alice.decrypt_max_plaintext_length(msg, sizeof(msg))];