]> err.no Git - yubikey-personalization.old/commitdiff
Fixed gcc warnings.
authorRichard Levitte <levitte@lp.se>
Sun, 13 Sep 2009 09:54:13 +0000 (09:54 +0000)
committerRichard Levitte <levitte@lp.se>
Sun, 13 Sep 2009 09:54:13 +0000 (09:54 +0000)
ykpbkdf2.c

index 87a687b684941abdf03d3dda93856629370ec85d..9273d1cba6d5b6ba8632238748070e750a608328 100644 (file)
@@ -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;