Mercurial > pidgin
changeset 15888:6577b292e7b4
Fix compiler warnings and errors in tests resulting from using DEBUG_CFLAGS
author | Stu Tomlinson <stu@nosnilmot.com> |
---|---|
date | Sat, 24 Mar 2007 19:51:48 +0000 |
parents | 8a2e7b406b4e |
children | 87ea711b9781 4a7a13521709 |
files | libpurple/tests/check_libpurple.c libpurple/tests/test_cipher.c libpurple/tests/test_jabber_jutil.c libpurple/tests/test_util.c libpurple/tests/tests.h |
diffstat | 5 files changed, 13 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/libpurple/tests/check_libpurple.c Sat Mar 24 19:11:55 2007 +0000 +++ b/libpurple/tests/check_libpurple.c Sat Mar 24 19:51:48 2007 +0000 @@ -3,6 +3,7 @@ #include "../core.h" #include "../eventloop.h" +#include "../util.h" #include "tests.h" @@ -22,6 +23,7 @@ (guint (*)(guint))g_source_remove, purple_check_input_add, (guint (*)(guint))g_source_remove, + NULL }; static void
--- a/libpurple/tests/test_cipher.c Sat Mar 24 19:11:55 2007 +0000 +++ b/libpurple/tests/test_cipher.c Sat Mar 24 19:51:48 2007 +0000 @@ -5,6 +5,8 @@ #undef HAVE_DBUS +#include "tests.h" + #include "../cipher.h" #include "../signal.h" @@ -15,7 +17,6 @@ PurpleCipher *cipher = NULL; \ PurpleCipherContext *context = NULL; \ gchar cdigest[33]; \ - gchar *sdigest = NULL; \ gboolean ret = FALSE; \ \ cipher = purple_ciphers_find_cipher("md4"); \ @@ -79,7 +80,6 @@ PurpleCipher *cipher = NULL; \ PurpleCipherContext *context = NULL; \ gchar cdigest[33]; \ - gchar *sdigest = NULL; \ gboolean ret = FALSE; \ \ cipher = purple_ciphers_find_cipher("md5"); \ @@ -142,7 +142,6 @@ PurpleCipher *cipher = NULL; \ PurpleCipherContext *context = NULL; \ gchar cdigest[41]; \ - gchar *sdigest = NULL; \ gboolean ret = FALSE; \ \ cipher = purple_ciphers_find_cipher("sha1"); \ @@ -198,7 +197,7 @@ cipher_suite(void) { Suite *s = suite_create("Cipher Suite"); TCase *tc = NULL; - + /* md4 tests */ tc = tcase_create("MD4"); tcase_add_test(tc, test_md4_empty_string);
--- a/libpurple/tests/test_jabber_jutil.c Sat Mar 24 19:11:55 2007 +0000 +++ b/libpurple/tests/test_jabber_jutil.c Sat Mar 24 19:51:48 2007 +0000 @@ -1,3 +1,5 @@ +#include <string.h> + #include "tests.h" #include "../protocols/jabber/jutil.h" @@ -29,12 +31,14 @@ START_TEST(test_nodeprep_validate) { + char *longnode; + fail_unless(jabber_nodeprep_validate(NULL)); fail_unless(jabber_nodeprep_validate("foo")); fail_unless(jabber_nodeprep_validate("%d")); fail_unless(jabber_nodeprep_validate("y\\z")); - char *longnode = g_strnfill(1023, 'a'); + longnode = g_strnfill(1023, 'a'); fail_unless(jabber_nodeprep_validate(longnode)); g_free(longnode); }
--- a/libpurple/tests/test_util.c Sat Mar 24 19:11:55 2007 +0000 +++ b/libpurple/tests/test_util.c Sat Mar 24 19:51:48 2007 +0000 @@ -1,3 +1,5 @@ +#include <string.h> + #include "tests.h" #include "../util.h"
--- a/libpurple/tests/tests.h Sat Mar 24 19:11:55 2007 +0000 +++ b/libpurple/tests/tests.h Sat Mar 24 19:51:48 2007 +0000 @@ -6,6 +6,7 @@ /* define the test suites here */ /* remember to add the suite to the runner in check_libpurple.c */ +Suite * master_suite(void); Suite * cipher_suite(void); Suite * jabber_jutil_suite(void); Suite * util_suite(void);