From 5d0236c25e72ad1c7303fb3d14fe263a40c47490 Mon Sep 17 00:00:00 2001 From: Frank Denis Date: Wed, 21 Oct 2015 17:42:22 +0200 Subject: [PATCH] C++ compat --- test/default/generichash.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/default/generichash.c b/test/default/generichash.c index 6f4b7346..045562b3 100644 --- a/test/default/generichash.c +++ b/test/default/generichash.c @@ -1301,9 +1301,9 @@ tv(void) size_t i = 0U; size_t in_len; - key = sodium_malloc(crypto_generichash_KEYBYTES_MAX); - out = sodium_malloc(crypto_generichash_BYTES_MAX); - expected_out = sodium_malloc(crypto_generichash_BYTES_MAX); + key = (unsigned char *) sodium_malloc(crypto_generichash_KEYBYTES_MAX); + out = (unsigned char *) sodium_malloc(crypto_generichash_BYTES_MAX); + expected_out = (unsigned char *) sodium_malloc(crypto_generichash_BYTES_MAX); do { assert(strlen(tests[i].key_hex) == 2 * crypto_generichash_KEYBYTES_MAX); sodium_hex2bin(key, crypto_generichash_KEYBYTES_MAX, @@ -1314,7 +1314,7 @@ tv(void) tests[i].out_hex, strlen(tests[i].out_hex), NULL, NULL, NULL); in_len = strlen(tests[i].in_hex) / 2; - in = sodium_malloc(in_len); + in = (unsigned char *) sodium_malloc(in_len); sodium_hex2bin(in, in_len, tests[i].in_hex, strlen(tests[i].in_hex), NULL, NULL, NULL); crypto_generichash(out, crypto_generichash_BYTES_MAX,