From 689d76d9d10b05a28bed0622f6c1231aa3212689 Mon Sep 17 00:00:00 2001 From: Sjoerd Simons Date: Tue, 1 Nov 2011 09:25:22 +0100 Subject: [PATCH 1/2] tests: Fix compilation error with libsasl2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit wocky-test-sasl-auth-server.c: In function ‘test_sasl_auth_server_new’: wocky-test-sasl-auth-server.c:932:17: error: expected ‘)’ before ‘proc’ wocky-test-sasl-auth-server.c:932:22: error: expected ‘)’ before ‘(’ token wocky-test-sasl-auth-server.c:932:30: error: expected ‘}’ before ‘test_sasl_server_auth_log’ wocky-test-sasl-auth-server.c:933:5: error: initialization from incompatible pointer type [-Werror] wocky-test-sasl-auth-server.c:933:5: error: (near initialization for ‘callbacks[1].proc’) [-Werror] wocky-test-sasl-auth-server.c: At top level: wocky-test-sasl-auth-server.c:886:1: error: ‘test_sasl_server_auth_log’ defined but not used [-Werror=unused-function] --- tests/wocky-test-sasl-auth-server.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/wocky-test-sasl-auth-server.c b/tests/wocky-test-sasl-auth-server.c index 10008de..687b7d9 100644 --- a/tests/wocky-test-sasl-auth-server.c +++ b/tests/wocky-test-sasl-auth-server.c @@ -36,6 +36,7 @@ #ifdef HAVE_LIBSASL2 #include +#include #define CHECK_SASL_RETURN(x) \ G_STMT_START { \ if (x < SASL_OK) { \ @@ -929,8 +930,8 @@ test_sasl_auth_server_new (GIOStream *stream, gchar *mech, static gboolean sasl_initialized = FALSE; int ret; static sasl_callback_t callbacks[] = { - { SASL_CB_LOG, test_sasl_server_auth_log, NULL }, - { SASL_CB_GETOPT, test_sasl_server_auth_getopt, NULL }, + { SASL_CB_LOG, (sasl_callback_ft) test_sasl_server_auth_log, NULL }, + { SASL_CB_GETOPT, (sasl_callback_ft) test_sasl_server_auth_getopt, NULL }, { SASL_CB_LIST_END, NULL, NULL }, }; -- 1.7.10.4