Commit 3759dd79 authored by Alexander Kanavin's avatar Alexander Kanavin

Added -Wall -Werror and fixed resulting issues

parent 382cace4
......@@ -52,6 +52,8 @@ fi
AC_SUBST(PLUGINSDIR)
AC_SUBST(EXTENSIONSDIR)
GSIGNON_CFLAGS="$GSIGNON_CFLAGS -Wall -Werror"
AC_OUTPUT([
Makefile
docs/Makefile
......
......@@ -2,7 +2,8 @@ noinst_PROGRAMS = gsignond-sasl-example
gsignond_sasl_example_SOURCES = gsignond-sasl-example.c
gsignond_sasl_example_CFLAGS = \
$(GSIGNON_CFLAGS)
$(GSIGNON_CFLAGS) \
-I$(top_srcdir)/src/
gsignond_sasl_example_LDADD = \
$(top_builddir)/src/libsasl.la \
......
......@@ -22,6 +22,8 @@
#include <gsignond/gsignond-session-data.h>
#include <gsignond/gsignond-plugin-interface.h>
#include <gsignond/gsignond-error.h>
#include "gsignond-sasl-plugin.h"
//this callback prints the received final response
//the final response should also be sent to the server
......@@ -30,7 +32,7 @@ static void final_response_callback(GSignondPlugin* plugin, GSignondSessionData*
{
const gchar* response = gsignond_dictionary_get_string(result,
"ResponseBase64");
g_printf("Authenticated successfully, got final response:\n%s\n",
g_print("Authenticated successfully, got final response:\n%s\n",
response);
}
......@@ -40,7 +42,7 @@ static void response_callback(GSignondPlugin* plugin, GSignondSessionData* resul
//print the received intermediate response
const gchar* response = gsignond_dictionary_get_string(result,
"ResponseBase64");
g_printf("Authenticated successfully, got intermediate response:\n%s\n",
g_print("Authenticated successfully, got intermediate response:\n%s\n",
response);
//here the response should be sent to the server, and the server should
......@@ -59,7 +61,7 @@ static void response_callback(GSignondPlugin* plugin, GSignondSessionData* resul
static void error_callback(GSignondPlugin* plugin, GError* error,
gpointer user_data)
{
g_printf("Got an error: %s\n", error->message);
g_print("Got an error: %s\n", error->message);
}
static void anonymous_authorization(gpointer plugin)
......@@ -153,7 +155,7 @@ int main (void)
//connect to various signals of the plugin object
g_signal_connect(plugin, "response-final", G_CALLBACK(final_response_callback), NULL);
gulong response_id = g_signal_connect(plugin, "response", G_CALLBACK(response_callback), NULL);
g_signal_connect(plugin, "response", G_CALLBACK(response_callback), NULL);
g_signal_connect(plugin, "error", G_CALLBACK(error_callback), NULL);
//how to use various authorization mechanisms
......
......@@ -50,7 +50,7 @@ static void check_plugin(GSignondPlugin* plugin)
START_TEST (test_saslplugin_create)
{
g_printf("Starting test_saslplugin_create\n");
g_print("Starting test_saslplugin_create\n");
gpointer plugin;
plugin = g_object_new(GSIGNOND_TYPE_SASL_PLUGIN, NULL);
......@@ -76,7 +76,7 @@ static void error_callback(GSignondPlugin* plugin, GError* error,
START_TEST (test_saslplugin_request_anonymous)
{
g_printf("Starting test_saslplugin_request_anonymous\n");
g_print("Starting test_saslplugin_request_anonymous\n");
gpointer plugin;
......@@ -130,7 +130,7 @@ END_TEST
START_TEST (test_saslplugin_request_plain)
{
g_printf("Starting test_saslplugin_request_plain\n");
g_print("Starting test_saslplugin_request_plain\n");
gpointer plugin;
plugin = g_object_new(GSIGNOND_TYPE_SASL_PLUGIN, NULL);
......@@ -176,7 +176,7 @@ END_TEST
START_TEST (test_saslplugin_request_digest_md5)
{
g_printf("Starting test_saslplugin_request_digest_md5\n");
g_print("Starting test_saslplugin_request_digest_md5\n");
gpointer plugin;
Gsasl *gsasl_context;
Gsasl_session *gsasl_session;
......@@ -247,7 +247,7 @@ END_TEST
START_TEST (test_saslplugin_request_cram_md5)
{
g_printf("Starting test_saslplugin_request_cram_md5\n");
g_print("Starting test_saslplugin_request_cram_md5\n");
gpointer plugin;
Gsasl *gsasl_context;
Gsasl_session *gsasl_session;
......@@ -306,7 +306,7 @@ END_TEST
START_TEST (test_saslplugin_request_scram_sha_1)
{
g_printf("Starting test_saslplugin_request_scram_sha_1\n");
g_print("Starting test_saslplugin_request_scram_sha_1\n");
gpointer plugin;
Gsasl *gsasl_context;
Gsasl_session *gsasl_session;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment