tests: Fix couple of compiler warnings
authorJouni Malinen <j@w1.fi>
Sat, 10 May 2014 09:15:36 +0000 (12:15 +0300)
committerJouni Malinen <j@w1.fi>
Sat, 10 May 2014 10:13:39 +0000 (13:13 +0300)
Signed-off-by: Jouni Malinen <j@w1.fi>
tests/test-sha1.c

index 9dcbbe9..313ae59 100644 (file)
@@ -412,7 +412,7 @@ int main(int argc, char *argv[])
                u8 psk[32];
                struct passphrase_test *test = &passphrase_tests[i];
                pbkdf2_sha1(test->passphrase,
-                           test->ssid, strlen(test->ssid),
+                           (const u8 *) test->ssid, strlen(test->ssid),
                            4096, psk, 32);
                if (memcmp(psk, test->psk, 32) == 0)
                        printf("Test case %d - OK\n", i);
@@ -426,8 +426,8 @@ int main(int argc, char *argv[])
        for (i = 0; i < NUM_RFC6070_TESTS; i++) {
                u8 dk[25];
                struct rfc6070_test *test = &rfc6070_tests[i];
-               pbkdf2_sha1(test->p, test->s, strlen(test->s), test->c,
-                           dk, test->dk_len);
+               pbkdf2_sha1(test->p, (const u8 *) test->s, strlen(test->s),
+                           test->c, dk, test->dk_len);
                if (memcmp(dk, test->dk, test->dk_len) == 0)
                        printf("Test case %d - OK\n", i);
                else {