diff libpurple/tests/test_util.c @ 26219:ba1799f21383

Cast away a few compile warnings in our "make check" tests, and add libpurple/plugins/one_time_password.c to POTFILES.in so that it can be translatinated.
author Mark Doliner <mark@kingant.net>
date Thu, 26 Mar 2009 07:27:05 +0000
parents 5aacf801f6b6
children 6271a72ba4f6
line wrap: on
line diff
--- a/libpurple/tests/test_util.c	Thu Mar 26 05:34:15 2009 +0000
+++ b/libpurple/tests/test_util.c	Thu Mar 26 07:27:05 2009 +0000
@@ -5,7 +5,7 @@
 
 START_TEST(test_util_base16_encode)
 {
-	assert_string_equal_free("68656c6c6f2c20776f726c642100", purple_base16_encode("hello, world!", 14));
+	assert_string_equal_free("68656c6c6f2c20776f726c642100", purple_base16_encode((const unsigned char *)"hello, world!", 14));
 }
 END_TEST
 
@@ -14,14 +14,14 @@
 	gsize sz = 0;
 	guchar *out = purple_base16_decode("21646c726f77202c6f6c6c656800", &sz);
 	fail_unless(sz == 14, NULL);
-	fail_unless(strcmp("!dlrow ,olleh", out) == 0, NULL);
+	fail_unless(strcmp("!dlrow ,olleh", (const char *)out) == 0, NULL);
 	g_free(out);
 }
 END_TEST
 
 START_TEST(test_util_base64_encode)
 {
-	assert_string_equal_free("Zm9ydHktdHdvAA==", purple_base64_encode("forty-two", 10));
+	assert_string_equal_free("Zm9ydHktdHdvAA==", purple_base64_encode((const unsigned char *)"forty-two", 10));
 }
 END_TEST
 
@@ -30,7 +30,7 @@
 	gsize sz;
 	guchar *out = purple_base64_decode("b3d0LXl0cm9mAA==", &sz);
 	fail_unless(sz == 10, NULL);
-	fail_unless(strcmp("owt-ytrof", out) == 0, NULL);
+	fail_unless(strcmp("owt-ytrof", (const char *)out) == 0, NULL);
 	g_free(out);
 }
 END_TEST