diff options
author | iphydf <iphydf@users.noreply.github.com> | 2016-08-10 13:52:40 +0100 |
---|---|---|
committer | iphydf <iphydf@users.noreply.github.com> | 2016-08-10 13:52:40 +0100 |
commit | fc330c1fa55003fa02928e27e146ab388fa65cdd (patch) | |
tree | 7d58d4554bcebd290c5601a4b94f655b33818701 /auto_tests/encryptsave_test.c | |
parent | 131522c335cbb8470871478724732b85bc1bf6e8 (diff) |
Silence/fix some compiler warnings.
Some of these (like the incompatible pointers one) are really annoying for
later refactoring.
Diffstat (limited to 'auto_tests/encryptsave_test.c')
-rw-r--r-- | auto_tests/encryptsave_test.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/auto_tests/encryptsave_test.c b/auto_tests/encryptsave_test.c index 266dfe96..c970b756 100644 --- a/auto_tests/encryptsave_test.c +++ b/auto_tests/encryptsave_test.c | |||
@@ -41,13 +41,14 @@ void accept_friend_request(Tox *m, const uint8_t *public_key, const uint8_t *dat | |||
41 | START_TEST(test_known_kdf) | 41 | START_TEST(test_known_kdf) |
42 | { | 42 | { |
43 | unsigned char out[crypto_box_BEFORENMBYTES]; | 43 | unsigned char out[crypto_box_BEFORENMBYTES]; |
44 | crypto_pwhash_scryptsalsa208sha256(out, | 44 | int res = crypto_pwhash_scryptsalsa208sha256(out, |
45 | crypto_box_BEFORENMBYTES, | 45 | crypto_box_BEFORENMBYTES, |
46 | pw, | 46 | pw, |
47 | pwlen, | 47 | pwlen, |
48 | salt, | 48 | salt, |
49 | crypto_pwhash_scryptsalsa208sha256_OPSLIMIT_INTERACTIVE * 8, | 49 | crypto_pwhash_scryptsalsa208sha256_OPSLIMIT_INTERACTIVE * 8, |
50 | crypto_pwhash_scryptsalsa208sha256_MEMLIMIT_INTERACTIVE); | 50 | crypto_pwhash_scryptsalsa208sha256_MEMLIMIT_INTERACTIVE); |
51 | ck_assert_msg(res != -1, "crypto function failed"); | ||
51 | ck_assert_msg(memcmp(out, known_key, crypto_box_BEFORENMBYTES) == 0, "derived key is wrong"); | 52 | ck_assert_msg(memcmp(out, known_key, crypto_box_BEFORENMBYTES) == 0, "derived key is wrong"); |
52 | } | 53 | } |
53 | END_TEST | 54 | END_TEST |