From fc330c1fa55003fa02928e27e146ab388fa65cdd Mon Sep 17 00:00:00 2001 From: iphydf Date: Wed, 10 Aug 2016 13:52:40 +0100 Subject: Silence/fix some compiler warnings. Some of these (like the incompatible pointers one) are really annoying for later refactoring. --- auto_tests/encryptsave_test.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'auto_tests/encryptsave_test.c') 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 START_TEST(test_known_kdf) { unsigned char out[crypto_box_BEFORENMBYTES]; - crypto_pwhash_scryptsalsa208sha256(out, - crypto_box_BEFORENMBYTES, - pw, - pwlen, - salt, - crypto_pwhash_scryptsalsa208sha256_OPSLIMIT_INTERACTIVE * 8, - crypto_pwhash_scryptsalsa208sha256_MEMLIMIT_INTERACTIVE); + int res = crypto_pwhash_scryptsalsa208sha256(out, + crypto_box_BEFORENMBYTES, + pw, + pwlen, + salt, + crypto_pwhash_scryptsalsa208sha256_OPSLIMIT_INTERACTIVE * 8, + crypto_pwhash_scryptsalsa208sha256_MEMLIMIT_INTERACTIVE); + ck_assert_msg(res != -1, "crypto function failed"); ck_assert_msg(memcmp(out, known_key, crypto_box_BEFORENMBYTES) == 0, "derived key is wrong"); } END_TEST -- cgit v1.2.3