From: Richard Levitte Date: Sun, 13 Sep 2009 09:54:13 +0000 (+0000) Subject: Fixed gcc warnings. X-Git-Tag: yubikey-personalisation_1.3.5-1~4^2~61 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d20658c3919c96e1dd6fa486da7f8bea7f931d97;p=yubikey-personalization.old Fixed gcc warnings. --- diff --git a/ykpbkdf2.c b/ykpbkdf2.c index 87a687b..9273d1c 100644 --- a/ykpbkdf2.c +++ b/ykpbkdf2.c @@ -57,7 +57,9 @@ int yk_pbkdf2(const char *passphrase, { size_t l = ((dklen - 1 + prf_method->output_size) / prf_method->output_size); +#if 0 /* r for "rest" is unused but may be interesting in the future */ size_t r = dklen - ((l - 1) * prf_method->output_size); +#endif unsigned int block_count; @@ -75,7 +77,7 @@ int yk_pbkdf2(const char *passphrase, for (iteration = 0; iteration < iterations; iteration++) { if (!prf_method->prf_fn(passphrase, strlen(passphrase), - block, block_len, + (char *)block, block_len, block, sizeof(block))) return 0; block_len = prf_method->output_size;